This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 121202 - Need to be able to run with sudo sometimes
Summary: Need to be able to run with sudo sometimes
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Project (show other bugs)
Version: 6.x
Hardware: Macintosh All
: P3 blocker with 1 vote (vote)
Assignee: Tomas Zezula
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-05 16:31 UTC by jarome
Modified: 2012-01-17 15:02 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jarome 2007-11-05 16:31:19 UTC
I have a NetBeans project that listens for snmp traps. This works just fine in non-secure OSs like Windows, but on my
Mac (or Linux), you need root privileges to connect to a low-numbered port when I try to debug it.
I can run my whole project as root using sudo, but this screws up all the permissions in my .netbeans file, and it is
somewhat dangerous to do. So I need a way of telling NetBeans (as me) to run the project as root by giving the sudo
password when it is launched.

I think this is an important feature.
Comment 1 Petr Chytil 2008-04-11 10:24:51 UTC
reassigning to projects (maybe new "run as administrator" feature?)
Comment 2 jarome 2008-04-11 14:56:47 UTC
"Run as administrator" would solve this for sure. This is an important issue if you run on a non-Windows platform. Of
course, Windows has no security, so it is a moot issue there, you can open any port.

By the way, my project needed to receive snmp traps which arrive on a low-numbered port.
Comment 3 Antonin Nebuzelsky 2010-03-29 14:10:30 UTC
Change of default owner.
Comment 4 Jesse Glick 2012-01-17 15:02:09 UTC
Probably too uncommon to merit any special UI treatment; assuming you are using an Ant-based Java SE project, you can just override -init-macrodef-java in build.xml to use <exec executable="sudo" ...> rather than <java fork="true" ...>. Better addressed via http://wiki.netbeans.org/NetBeansUserFAQ or stackoverflow.com, I think.