Wednesday June 14, 2006 By default, you cannot use ports below 1024 if you are running Glassfish or Sun Java System Application Server (or anything else, for that matter) as non-root Solaris user. Solaris 10 provides role
based access control (RBAC) which makes this rather trivial (although
you'll still need one-time root user access to make it possible).
So, how to do it?
Step 1: login as root user or run su command
Step 2: run following command:
/usr/sbin/usermod -K defaultpriv=basic,net_privaddr <username>
where <username> is the username you are using to run Glassfish.
That's it :-)
Thanks for the tip. I added the new privileges to the "webservd" user via usermod and found that I could not bind to port 80 via SMF. I ended up needing to specify the new privileges in my manifest. Perhaps, those savvy with SMF know this already, but alas I am new to it. The good news, it didn't take me that long to figure it out. Here is my working start method for app server.
<exec_method type='method' name='start' exec='/app/appserv/bin/asadmin start-domain domain1' timeout_seconds='60'> <method_context> <method_credential user='webservd' group='webservd' privileges='basic,net_privaddr'/> </method_context> </exec_method>Posted by Matthew Montgomery on June 26, 2006 at 02:07 PM PDT #
Posted by Snjezana on June 27, 2006 at 02:53 PM PDT #
Posted by Bob Haupt on July 08, 2006 at 12:12 PM PDT #
http://developer.apple.com/macosx/launchd.html
Quote: "Of particular interest is that launchd can run a job as a non-root user, but still bind it to a privileged port. This removes one common reason to run daemons as root."
Also:
http://forum.textdrive.com/viewtopic.php?pid=43297
You might want to check it out and see if this can fit your purpose, but as far as I can tell it is not really the equivalent of Solaris RBAC.
Posted by Snjezana on July 10, 2006 at 11:33 AM PDT #