tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Turner, John" <JTur...@AAS.com>
Subject RE: running tomcat as a non-root user?
Date Thu, 02 Jan 2003 12:54:05 GMT

Not really.  sudo is more for running tasks as another user, typically root,
that have some endpoint.  Since Tomcat is a service, you are better off
creating a start script that does something like:

su - tomcat -c $CATALINA_HOME/bin/startup.sh

If you run the startup script as root, the "- tomcat -c" in the command says
"switch to user tomcat, get user tomcat's environment, and execute the
command that follows". When Tomcat's startup scripts exit, you will be back
at a root prompt, with the Tomcat service continuing as whatever user you
had on the su command line.

John


> -----Original Message-----
> From: karthikeyan.balasubramanian
> [mailto:karthikeyan.balasubramanian@aspiresys.com]
> Sent: Thursday, January 02, 2003 3:25 PM
> To: Tomcat Users List
> Subject: Re: running tomcat as a non-root user?
> 
> 
> Thanks.
> 
> I think you can use "sudo" for this job.
> 
> Karthikeyan.
> ----- Original Message -----
> From: "waimun" <dev@waimun.net>
> To: <tomcat-user@jakarta.apache.org>
> Sent: Wednesday, January 01, 2003 5:43 AM
> Subject: Re: running tomcat as a non-root user?
> 
> 
> >
> > Hi Karthikeyan:
> > What I did was basically following those previous mails' help hints.
> First, I created a directory base for my tomcat files, using 
> that I created
> a tomcat user for that and disable shell access also since I 
> feel that it's
> not needed. Following that, I fire up the tomcat thru 
> startup.sh as usual
> (su and/or login); take note also that if you are binding to port80 or
> <1024, then you'll still root access [this is also highlighted by the
> replies]. Of course, if you want more customization, you can 
> then create the
> rc"s, and I think that was also mentioned in one of the contributors
> replies.
> >
> > Good luck, and Happy new year.
> >
> > P.S. Btw, does anyone know is there a way where I could run w/o
> login/su'ing to normal user; ie as root, fire up startup.sh 
> but processes
> created will be by owner of the tomcat files?
> >
> > On Wed, Jan 01, 2003 at 02:21:47AM +0530, 
> karthikeyan.balasubramanian
> wrote:
> > > Hi can you tell what are all the steps you followed.
> > >
> > > Would be helpful for me in future when i do this.
> > >
> > > karthikeyan.
> > > ----- Original Message -----
> > > From: "waimun" <dev@waimun.net>
> > > To: <tomcat-user@jakarta.apache.org>
> > > Sent: Tuesday, December 31, 2002 8:41 AM
> > > Subject: Re: running tomcat as a non-root user?
> > >
> > >
> > > >
> > > > Thanks to all those who responded; John, Mike, Jerry, 
> Ben, Noel. Yes,
> I
> > > got it working.
> > > >
> > > > Season greetings.
> > > >
> > > > --
> > > > To unsubscribe, e-mail:
> > > <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> > > > For additional commands, e-mail:
> > > <mailto:tomcat-user-help@jakarta.apache.org>
> > > >
> > >
> > >
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail:
> <mailto:tomcat-user-help@jakarta.apache.org>
> >
> 
> 
> 
> --
> To unsubscribe, e-mail:   
<mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:tomcat-user-help@jakarta.apache.org>

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


Mime
View raw message