You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Mumanyi Bravismore <br...@uzlib.uz.ac.zw> on 2005/01/14 08:12:44 UTC

Installing and running tomcat as a user other than root

How can one achieve to install and run tomcat as a user other than root. 
  I have tried to extract tomcat from the *.gz as a user but once I try 
to access it from the browser I get the "Connection Failed" error when 
in actually fact tomcat is running.

When I su -l to root and restart tomcat, I am able to see the page.

Thanks in advance.

Regards
/Bravo


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: SV: Installing and running tomcat as a user other than root

Posted by Ben Souther <bs...@fwdco.com>.
>Any tips on how to grant priviledges to port 80 or 8080 on 
>linux to a user.

Two ways:
1.) Install Apache (HTTPD) and a connector and have it pass the requests
to Tomcat.

2.) Use http://jakarta.apache.org/commons/daemon which can bind to 
port 80 as root and then downgrade itself to a regular user for
everything else (as Apache HTTPD does).  I've heard that the latest CVS
release of commons/daemon has some important bug fixes that affect
stability.

I just use port forwarding at the router level and leave Tomcat on port
8080.



On Fri, 2005-01-14 at 03:19, Mumanyi Bravismore wrote:
> Sorry, I am on RedHat 9. I have given the user -rwx- of the [tomcat] 
> dir, No problem with the user starting tomcat. ps -e|grep java shows the 
> tomcat process is running but when I try to access the pages from the 
> browser, connection is failing.
> 
> Any tips on how to grant priviledges to port 80 or 8080 on linux to a user.
> 
> Thanks
> 
> Roland Carlsson wrote:
> > Hi Mumanyi!
> > 
> > This will require some knowleage about you operatingsystem since not all
> > operation is allowed being a non-root user. But it basically comes down to
> > this:
> > 
> > Grant the user you would like to run tomcat read and write rights on the
> > whole tomcat install-dir. This because tomcat write down a few things to
> > disk.
> > 
> > Make sure that you operating system allow the user to open up the port you
> > which tomcat to run on. Usually ports under 1024 are dissallowed without
> > special privilegies.
> > 
> > If you still are having problem you have to read the logs to see why tomcat
> > fails to start correctly.
> > 
> > Regards
> > Roland Carlsson
> > 
> > 
> > 
> > 
> > Den 05-01-14 08.12, skrev "Mumanyi Bravismore" <br...@uzlib.uz.ac.zw>:
> > 
> > 
> >>How can one achieve to install and run tomcat as a user other than root.
> >>  I have tried to extract tomcat from the *.gz as a user but once I try
> >>to access it from the browser I get the "Connection Failed" error when
> >>in actually fact tomcat is running.
> >>
> >>When I su -l to root and restart tomcat, I am able to see the page.
> >>
> >>Thanks in advance.
> >>
> >>Regards
> >>/Bravo
> >>
> >>
> >>---------------------------------------------------------------------
> >>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> >>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> >>
> > 
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: SV: SV: Installing and running tomcat as a user other than root

Posted by Mumanyi Bravismore <br...@uzlib.uz.ac.zw>.
I am accessing it from another machine.

Roland Carlsson wrote:

> Are you accessing tomcat from localhost or any other host?
> 
> 
> Den 05-01-14 09.19, skrev "Mumanyi Bravismore" <br...@uzlib.uz.ac.zw>:
> 
> 
>>Sorry, I am on RedHat 9. I have given the user -rwx- of the [tomcat]
>>dir, No problem with the user starting tomcat. ps -e|grep java shows the
>>tomcat process is running but when I try to access the pages from the
>>browser, connection is failing.
>>
>>Any tips on how to grant priviledges to port 80 or 8080 on linux to a user.
>>
>>Thanks
>>
>>Roland Carlsson wrote:
>>
>>>Hi Mumanyi!
>>>
>>>This will require some knowleage about you operatingsystem since not all
>>>operation is allowed being a non-root user. But it basically comes down to
>>>this:
>>>
>>>Grant the user you would like to run tomcat read and write rights on the
>>>whole tomcat install-dir. This because tomcat write down a few things to
>>>disk.
>>>
>>>Make sure that you operating system allow the user to open up the port you
>>>which tomcat to run on. Usually ports under 1024 are dissallowed without
>>>special privilegies.
>>>
>>>If you still are having problem you have to read the logs to see why tomcat
>>>fails to start correctly.
>>>
>>>Regards
>>>Roland Carlsson
>>>
>>>
>>>
>>>
>>>Den 05-01-14 08.12, skrev "Mumanyi Bravismore" <br...@uzlib.uz.ac.zw>:
>>>
>>>
>>>
>>>>How can one achieve to install and run tomcat as a user other than root.
>>>> I have tried to extract tomcat from the *.gz as a user but once I try
>>>>to access it from the browser I get the "Connection Failed" error when
>>>>in actually fact tomcat is running.
>>>>
>>>>When I su -l to root and restart tomcat, I am able to see the page.
>>>>
>>>>Thanks in advance.
>>>>
>>>>Regards
>>>>/Bravo
>>>>
>>>>
>>>>---------------------------------------------------------------------
>>>>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>>>>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>>>
>>>
>>>
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>>>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


SV: SV: Installing and running tomcat as a user other than root

Posted by Roland Carlsson <ro...@alfa-moving.se>.
Are you accessing tomcat from localhost or any other host?


Den 05-01-14 09.19, skrev "Mumanyi Bravismore" <br...@uzlib.uz.ac.zw>:

> Sorry, I am on RedHat 9. I have given the user -rwx- of the [tomcat]
> dir, No problem with the user starting tomcat. ps -e|grep java shows the
> tomcat process is running but when I try to access the pages from the
> browser, connection is failing.
> 
> Any tips on how to grant priviledges to port 80 or 8080 on linux to a user.
> 
> Thanks
> 
> Roland Carlsson wrote:
>> Hi Mumanyi!
>> 
>> This will require some knowleage about you operatingsystem since not all
>> operation is allowed being a non-root user. But it basically comes down to
>> this:
>> 
>> Grant the user you would like to run tomcat read and write rights on the
>> whole tomcat install-dir. This because tomcat write down a few things to
>> disk.
>> 
>> Make sure that you operating system allow the user to open up the port you
>> which tomcat to run on. Usually ports under 1024 are dissallowed without
>> special privilegies.
>> 
>> If you still are having problem you have to read the logs to see why tomcat
>> fails to start correctly.
>> 
>> Regards
>> Roland Carlsson
>> 
>> 
>> 
>> 
>> Den 05-01-14 08.12, skrev "Mumanyi Bravismore" <br...@uzlib.uz.ac.zw>:
>> 
>> 
>>> How can one achieve to install and run tomcat as a user other than root.
>>>  I have tried to extract tomcat from the *.gz as a user but once I try
>>> to access it from the browser I get the "Connection Failed" error when
>>> in actually fact tomcat is running.
>>> 
>>> When I su -l to root and restart tomcat, I am able to see the page.
>>> 
>>> Thanks in advance.
>>> 
>>> Regards
>>> /Bravo
>>> 
>>> 
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>> 
>> 
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: SV: Installing and running tomcat as a user other than root

Posted by Mumanyi Bravismore <br...@uzlib.uz.ac.zw>.
Sorry, I am on RedHat 9. I have given the user -rwx- of the [tomcat] 
dir, No problem with the user starting tomcat. ps -e|grep java shows the 
tomcat process is running but when I try to access the pages from the 
browser, connection is failing.

Any tips on how to grant priviledges to port 80 or 8080 on linux to a user.

Thanks

Roland Carlsson wrote:
> Hi Mumanyi!
> 
> This will require some knowleage about you operatingsystem since not all
> operation is allowed being a non-root user. But it basically comes down to
> this:
> 
> Grant the user you would like to run tomcat read and write rights on the
> whole tomcat install-dir. This because tomcat write down a few things to
> disk.
> 
> Make sure that you operating system allow the user to open up the port you
> which tomcat to run on. Usually ports under 1024 are dissallowed without
> special privilegies.
> 
> If you still are having problem you have to read the logs to see why tomcat
> fails to start correctly.
> 
> Regards
> Roland Carlsson
> 
> 
> 
> 
> Den 05-01-14 08.12, skrev "Mumanyi Bravismore" <br...@uzlib.uz.ac.zw>:
> 
> 
>>How can one achieve to install and run tomcat as a user other than root.
>>  I have tried to extract tomcat from the *.gz as a user but once I try
>>to access it from the browser I get the "Connection Failed" error when
>>in actually fact tomcat is running.
>>
>>When I su -l to root and restart tomcat, I am able to see the page.
>>
>>Thanks in advance.
>>
>>Regards
>>/Bravo
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: SV: Installing and running tomcat as a user other than root

Posted by Pete Stevens <pe...@ex-parrot.com>.
My instructions for building a dedicated linux machine that runs Tomcat as the
apache user (based on Whitebox Linux - a rebuild of Redhat).

http://www.mythic-beasts.com/support/topic_vds_java.html


Yours,

Pete Stevens

On Fri, 14 Jan 2005, Roland Carlsson wrote:

> Hi Mumanyi!
>
> This will require some knowleage about you operatingsystem since not all
> operation is allowed being a non-root user. But it basically comes down to
> this:
>
> Grant the user you would like to run tomcat read and write rights on the
> whole tomcat install-dir. This because tomcat write down a few things to
> disk.
>
> Make sure that you operating system allow the user to open up the port you
> which tomcat to run on. Usually ports under 1024 are dissallowed without
> special privilegies.
>
> If you still are having problem you have to read the logs to see why tomcat
> fails to start correctly.
>
> Regards
> Roland Carlsson
>
>
>
>
> Den 05-01-14 08.12, skrev "Mumanyi Bravismore" <br...@uzlib.uz.ac.zw>:
>
> > How can one achieve to install and run tomcat as a user other than root.
> >   I have tried to extract tomcat from the *.gz as a user but once I try
> > to access it from the browser I get the "Connection Failed" error when
> > in actually fact tomcat is running.
> >
> > When I su -l to root and restart tomcat, I am able to see the page.
> >
> > Thanks in advance.
> >
> > Regards
> > /Bravo
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>

--
Pete Stevens
pete@ex-parrot.com
http://www.ex-parrot.com/~pete/

  It's always darkest before dawn. So if you're going to steal your neighbour's
                                        milk bottles, that's the time to do it.

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


SV: Installing and running tomcat as a user other than root

Posted by Roland Carlsson <ro...@alfa-moving.se>.
Hi Mumanyi!

This will require some knowleage about you operatingsystem since not all
operation is allowed being a non-root user. But it basically comes down to
this:

Grant the user you would like to run tomcat read and write rights on the
whole tomcat install-dir. This because tomcat write down a few things to
disk.

Make sure that you operating system allow the user to open up the port you
which tomcat to run on. Usually ports under 1024 are dissallowed without
special privilegies.

If you still are having problem you have to read the logs to see why tomcat
fails to start correctly.

Regards
Roland Carlsson




Den 05-01-14 08.12, skrev "Mumanyi Bravismore" <br...@uzlib.uz.ac.zw>:

> How can one achieve to install and run tomcat as a user other than root.
>   I have tried to extract tomcat from the *.gz as a user but once I try
> to access it from the browser I get the "Connection Failed" error when
> in actually fact tomcat is running.
> 
> When I su -l to root and restart tomcat, I am able to see the page.
> 
> Thanks in advance.
> 
> Regards
> /Bravo
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org