Operating System - HP-UX
1832487 Members
4303 Online
110043 Solutions
New Discussion

Re: tomcat unable to start at port 80

 
sstan
Frequent Advisor

tomcat unable to start at port 80

Hi guys,
I am having problem of starting tomcat 4.1 using port 80 as non root user on hp 11.11 , everytime started it complain permission denied in the catalina.out file. Had anybody had workaround to start the web server using non root ?

Our server OS is ver 11.11, many thanks in advance.
5 REPLIES 5
Vibhor Kumar Agarwal
Esteemed Contributor

Re: tomcat unable to start at port 80

Try changing the permission of the catalina.out file to 777
Vibhor Kumar Agarwal
Alex Lavrov.
Honored Contributor

Re: tomcat unable to start at port 80

The problem is not the log file, so probably setting 777 permissions to the log file, will not do the job.

*** The problem is to bind to port less than 1024 as non-root. Only root can bind to these ports ***

Think about some user, that writes some program and then binds to the port 23? Let's say telnet is not used on this server. Now the user can get all the passwords of the users that think that telnet is there.

Alex.
I don't give a damn for a man that can only spell a word one way. (M. Twain)
sstan
Frequent Advisor

Re: tomcat unable to start at port 80

Hi Alex,
you are right , it need to bind to the port 80 which is the well known port reserved for root.

IT had nothing to do with catalina.out file.

Any one had experience on this.?
Alex Lavrov.
Honored Contributor

Re: tomcat unable to start at port 80

Again:

*** Only root can bind to these ports ***

Alex.
I don't give a damn for a man that can only spell a word one way. (M. Twain)
rick jones
Honored Contributor

Re: tomcat unable to start at port 80

So, to be a bit more explicit - if you want to mcat to bind to port 80, it _must_ be root when it tries to do the bind() call. Before/after that point, it does not have to be root, so you might see if Tomcat has a way to "drop" priviledges after setup.

Otherwise, you need to pick another port number.

Now, having said that, there is the possiblity of a _massive_ kludge - you could use ndd to change tcp_smallest_nonpriv_port to say 79 but again, that is a MASSIVE kludge. Far better to find priv dropping support in Tomcat or use another port number.
there is no rest for the wicked yet the virtuous have no pillows