I run Tomcat in a Solaris 10 SPARC machine using jsvc through a init script.

jsvc is started by root, but I specify the "-user" option to change to
the "application" user.
I use the option "-outfile" and  "-errfile" to specify where to direct
stdout and stderr, "catalina.out" and "catalina.err" in my
environment.

I am getting the following log files:

# ls -l
-rw-------   1 root     root           0 Aug  3 15:23 admin.2011-08-03.log
-rw-------   1 root     root        7606 Aug  3 15:26 catalina.2011-08-03.log
-rw-------   1 root     root           0 Aug  3 15:23 catalina.err
-rw-------   1 root     root           0 Aug  3 15:23 catalina.out
-rw-------   1 root     root           0 Aug  3 15:23
host-manager.2011-08-03.log
-rw-------   1 root     root         126 Aug  3 15:27 localhost.2011-08-03.log
-rw-------   1 root     root           0 Aug  3 15:23 manager.2011-08-03.log
-rw-rw-r--   1 application   svcjava    93760 Aug  3 15:27 servicelog

As expected, "catalina.out" and "catalina.err" are owned by root. I
minimize any output to these files.
Also as I expected, the logs of my webapp ("servicelog") is owned by
the  "application" user and it is created with permissions 664 (since
I specify the umask 002)

But, why are the other logs produced by Tomcat owned by root ? Isn't
the whole JVM changing to the "application" user?
Is there a way to have these logs also owned by "application" user
whenever they get created?

The only difference I am aware of is that Tomcat (catalina), the
manager and host-manager webapps use JULI, while my web app uses
Log4j.

Is JULI running before jsvc switches to the "application" user?


-Jorge

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to