Re: How Do I Run a Java App with Superuser Privileges?
Re: How Do I Run a Java App with Superuser Privileges?
- Subject: Re: How Do I Run a Java App with Superuser Privileges?
- From: Justin Walker <email@hidden>
- Date: Mon, 13 Dec 2004 21:24:55 -0800
On Dec 13, 2004, at 21:11, James Berry wrote:
On Dec 13, 2004, at 8:55 PM, William C. McCain wrote:
Is there a property in Info.plist that I can set to give my Java
application, packaged as a .app bundle, the superuser privilege? Or
some other simple way to run a Java app with superuser privileges?
Java won't do this for you automatically. Ultimately you've got to get
it running at superuser privilege. Common techniques include using a
script to run it with su privileges by setting the ownership to root,
and setting the suid bit.
FWIW, I don't think this will work on most recent unices. It
definitely doesn't on Mac OS X, 10.3.6:
$ cat foo.sh
id
$ ls -l foo.sh
-r-sr-xr-x 1 root staff 3 13 Dec 21:22 foo.sh
$ foo.sh
uid=10180(justin) gid=20(staff) groups=20(staff), 79(appserverusr),
80(admin), 81(appserveradm)
Most systems will not permit shell scripts to execute 'setuid'.
Regards,
Justin
--
Justin C. Walker, Curmudgeon-At-Large *
Institute for General Semantics | "Weaseling out of things is
what
| separates us from the animals.
| Well, except the weasel."
| - Homer J Simpson
*--------------------------------------*-------------------------------*
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden