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:[EMAIL PROTECTED]] > 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" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > 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" <[EMAIL PROTECTED]> > > > To: <[EMAIL PROTECTED]> > > > 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:[EMAIL PROTECTED]> > > > > For additional commands, e-mail: > > > <mailto:[EMAIL PROTECTED]> > > > > > > > > > > > > > > -- > > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> > > > > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
