Hi,
when you run tomcat with jsvc and have jsvc drop privileges to a
different user, stdout and stderr log files are still created with
root as owner.
Can you make jsvc create them as the -user ?
weberjn@beo:~/apache-tomcat-9.0.36/logs$ ll
total 20
-rw------- 1 weberjn weberjn 4630 Jun 26 08:28 catalina.2020-06-26.log
-rw------- 1 root root 4630 Jun 26 08:28 catalina.err
-rw------- 1 root root 28 Jun 26 08:28 catalina.out
-rw------- 1 weberjn weberjn 0 Jun 26 08:28 host-manager.2020-06-26.log
-rw------- 1 weberjn weberjn 0 Jun 26 08:28 localhost.2020-06-26.log
-rw------- 1 weberjn weberjn 0 Jun 26 08:28
localhost_access_log.2020-06-26.txt
-rw------- 1 weberjn weberjn 0 Jun 26 08:28 manager.2020-06-26.log
jsvc \
-classpath
$CATALINA_HOME/bin/bootstrap.jar:$CATALINA_HOME/bin/tomcat-juli.jar
\
-outfile $CATALINA_BASE/logs/catalina.out \
-errfile $CATALINA_BASE/logs/catalina.err \
-java-home /usr/lib/jvm/java-11-openjdk-amd64 \
-user weberjn \
-Dcatalina.home=$CATALINA_HOME \
-Dcatalina.base=$CATALINA_BASE \
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager \
-Djava.util.logging.config.file=$CATALINA_BASE/conf/logging.properties \
org.apache.catalina.startup.Bootstrap
jsvc (Apache Commons Daemon) 1.2.3-dev
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]