Computing.Net > Forums > Solaris > how to use port 80 as non root user

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

how to use port 80 as non root user

Reply to Message Icon

Name: Hans-Georg Kruse
Date: August 21, 2002 at 05:02:34 Pacific
Comment:

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.



Sponsored Link
Ads by Google

Response Number 1
Name: deks
Date: August 21, 2002 at 18:31:56 Pacific
Reply:

when you do a #ps -ef|grep httpd who own's the process?


0

Response Number 2
Name: Hans-Georg Kruse
Date: August 22, 2002 at 00:13:06 Pacific
Reply:

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?


0

Response Number 3
Name: James
Date: August 22, 2002 at 04:34:10 Pacific
Reply:

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


0

Response Number 4
Name: Mark M
Date: August 25, 2002 at 18:37:46 Pacific
Reply:

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.


0

Response Number 5
Name: Hans-Georg Kruse
Date: August 28, 2002 at 12:04:29 Pacific
Reply:

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


0

Related Posts

See More



Response Number 6
Name: Mark M
Date: September 1, 2002 at 01:09:56 Pacific
Reply:

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.


0

Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

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


Go to Solaris Forum Home


Sponsored links

Ads by Google


Results for: how to use port 80 as non root user

how to use port 80 as non root user www.computing.net/answers/solaris/how-to-use-port-80-as-non-root-user/4414.html

Problem with non root user www.computing.net/answers/solaris/problem-with-non-root-user/3117.html

Non root user processes dies www.computing.net/answers/solaris/non-root-user-processes-dies/3214.html