tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Downey <steve.dow...@netfolio.com>
Subject RE: Tomcat before Apache
Date Tue, 21 Aug 2001 14:34:34 GMT


> -----Original Message-----
> From: Christopher Cain [mailto:ccain@mhsoftware.com]
> Sent: Friday, August 17, 2001 2:32 PM
> To: tomcat-dev@jakarta.apache.org
> Subject: Re: Tomcat before Apache
> 
> 
> 
> 
> "Pier P. Fumagalli" wrote:
> > 
> > Christopher Cain at ccain@mhsoftware.com wrote:
> > >
> > >> I'm attaching a little C script that degradates the 
> process to a specified
> > >> user before execuing it. To compile do "gcc -O2 
> safexec.c -o safexec" and to
> > >> run, (for example catalina) do:
> > >>
> > >> safexec username $CATALINA_HOME/bin/catalina.sh start
> > >>
> > >> It's written for Solaris, but it should work also on 
> Linux (maybe some
> > >> compilation warning of some kind)... DO NOT INSTALL IT 
> W/ SUID PRIVILEGES,
> > >> otherwise anyone will be able to break into your machine 
> _easily_... 'K?
> > >
> > > My startup script (Linux) simply does this:
> > >
> > >  daemon --user nobody $CATALINA_HOME/bin/catalina.sh start
> > 
> > This is I believe Bergstein's daemontools?
> 
> To be honest, I'm not sure. It's how alot of the standard 
> init.d scripts
> are coded in Linux, so that's how I've also done mine. Whatever it is,
> it's installed by default on every Linux distro I've ever 
> used. Perhaps
> I could throw a small patch into RUNNING.txt with a one-liner for *nix
> users that the above is a safe way to put TC startup in a script file?
> Does Solaris include this "daemontools" by default as well?
> 
On Redhat, at least, daemon is a shell function that's sourced into the
init.d scripts. It does a few things, but in the end either executes the
daemon or does a 'su - $user -c $*', execing the daemon as the specified
user.

It also will nice the daemon if it's given a nice level.


<><><><><><><><><><><><><><><><><><><><><>This
electronic mail transmission
may contain confidential information and is intended only for the person(s)
named.  Any use, copying or disclosure by any other person is strictly
prohibited.  If you have received this transmission in error, please notify
the sender via e-mail. <><><><><><><><><><><><><><><><><><><><><>

Mime
View raw message