tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gregor Schneider <>
Subject New jsvc (commons-daemon-native); catalina.out is owned by root - WTF?
Date Tue, 30 Nov 2010 18:31:22 GMT
Hi guys,

we had some issues due to a memory-leak here and used this opportunity
to upgrade our Tomcat from 5.5.20 to 5.5.31.

Here's our current environment:

tomcat@www2:~/local/tomcat55/bin$ ./
Using CATALINA_BASE:   /home/tomcat/local/tomcat55
Using CATALINA_HOME:   /home/tomcat/local/tomcat55
Using CATALINA_TMPDIR: /home/tomcat/local/tomcat55/temp
Using JRE_HOME:        /home/tomcat/local/jdk15/
Using CLASSPATH:       /home/tomcat/local/tomcat55/bin/bootstrap.jar
Server version: Apache Tomcat/5.5.31
Server built:   Sep 4 2010 12:53:08
Server number:
OS Name:        Linux
OS Version:     2.6.18-3-amd64
Architecture:   amd64
JVM Version:    1.5.0_10-b03
JVM Vendor:     Sun Microsystems Inc.

The interesting options inside our startup-script are

[ ...]
    echo "Starting tomcat"
    $DAEMON_HOME/bin/jsvc \
    -user $TOMCAT_USER \
    -home $JAVA_HOME \
    -Dcatalina.home=$CATALINA_HOME \
    -Dcatalina.base=$CATALINA_BASE \$TMP_DIR \
    -Dlog4j.configuration=log4j.xml \
    -wait 10 \
    -pidfile $PID_FILE \
    -outfile $CATALINA_HOME/logs/catalina.out \
    -errfile '&1' \
    $JAVA_OPTS \
    -cp $CLASSPATH \
    exit $?

What's really puzzling me, is, that since we upgraded Tomcat,
catalina.out is not owned by the user specified in $TOMCAT_USER any
more but is owned by root.

All other files are owned by $TOMCAT_USER as expected.

What did we change?

Well, in the old version, there was the archive "tomcat-native.tar.gz"
containing the sources for the native wrapper.

Now, with Tomcat 5.5.31, there's a new archive
"commons-daemon-native.tar.gz", which also contains the native wrapper
sources - however, the old one is also coming with the

I couldn't find anything in the docs saying "we've changed the
native-wrapper-implementation - use the new one" or similar. So I
guessed that the old one might be depricated, so I used the sources
from "commons-daemon-native.tar.gz".

Works like charm, the only catch is, as described above, that
catalina.out now is owned by root. Before, said file was owned by

This is really a PITA, since we don't want to grant root-access to the

Could somebody in this list please explain, either what I'm missing
here, and also, what's the difference between the two

When checking for the jsvc-parameters with "./jsvc -help", I
recognized that the parameter "-user" didn't change.

I'm aware that I could patch the startup-script by inserting something
like "chown ${TOCMAT_USER} ${CATALINA_HOME}/logs/catalina.out",
however, to me this seems only like the 2nd best solution.

Any hints very much appreciated!



just because you're paranoid, don't mean they're not after you...
gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
gpgp-key available

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message