Re: How Do I Run a Java App with Superuser Privileges?
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com On Dec 13, 2004, at 21:11, James Berry wrote: On Dec 13, 2004, at 8:55 PM, William C. McCain wrote: Most systems will not permit shell scripts to execute 'setuid'. Regards, Justin _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... 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) -- 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 *--------------------------------------*-------------------------------* This email sent to site_archiver@lists.apple.com
participants (1)
-
Justin Walker