Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hi,
I installed the java devwex webserver (from www.seanox.de) on solaris 8. When I start the webserver (a java program) as root it can listen on port 80. As a normal user the server doesn't start at port 80. Any ideas?
thanks - hg.

I don't have a httpd process.
I have a java process.
The webserver is started with the command line:
java -cp devwex.jar Devwex START
I created a user normal user "webadm". When I start the java Webserver under the webadm user port 80 can't be used. And the java process is owned by webadm.
When I start the program as root port 80 can be used and the java process is owned by root.
Where in solaris is a port restriction for normal users?

Ports 0 - 1023 are privileged ports in Solaris.
To bind to these as a non-priviliged user the process must be started by a privileged user and the user id switched after the port is bound.
This should be performed by the server process itself - I'm afraid I no nothing of the particular server you are using but their should be an option to set the runtime user in your config files, though you would still start the process as root (or similar)
HTH ?
James

As the above posting suggests - there should be a conf file somewhere you can edit. Or at least I would imagine there is.
Applications like this tend to lean towards the practice of using the "nobody" user for security and convenience. You may want to try setting the owner to the UID of nobody if the option is there to do it.

thank you for your answers
this small java server dosn't have the feature to change the user
so at the moment its running with root priviliges

In this case I can only suggest one thing:
Set your java http server to run under an unpriveleged user, but run it on say port 8080. The run a NAT translation on your router from port 80 on incoming WAN and transpose it to 8080 on the private network.
Not ideal but it should work.

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |