tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <Craig.McClana...@eng.sun.com>
Subject Re: Running Tomcat as user nobody
Date Wed, 02 Aug 2000 16:57:29 GMT
"Michael A. Alderete" wrote:

> Hi,
>
> How can I get Tomcat to run as user "nobody" on my FreeBSD system? I
> imagine it's a line or two in one of the startup shell scripts for Tomcat,
> but I can't get that to work; I keep getting "this account is not
> available" error messages, presumably because nobody is using /sbin/nologin
> for a shell.
>
> Here's my configuration:
>
> FreeBSD 3.2
> Apache 1.3.12
> Tomcat 3.1
> JDK 1.1.8 from the FreeBSD ports collection
>
> Even if no one here is running FreeBSD, I'd imagine the procedure is
> similar for Linux, if you can tell me how you did it there.
>

The way I've done this in the past is set up a special script executable by
root that has the following contents (or something similar):

    su - nobody -c "$TOMCAT_HOME/bin/tomcat.sh start"

Then execute this script as root (for example, in whatever FreeBSD uses as the
equivalent of the /etc/rc.d/init.d directory) and the actual Tomcat process
will start up as user nobody.

>
> Thanks!
>
> Michael
>

Craig McClanahan



Mime
View raw message