Inline response:

On 12/16/2013 6:06 PM, Chris Wise wrote:
Hey Mark,

Thanks for the response :)

Just a quick question - won't this make ALL files Tomcat creates the same
permissive...ness?  Instead of just the log files?

This is true, but shouldn't be a problem.

If you're running on a system that has ACL, then you could try the following:

cd $CATALINA_BASE
setfacl -n -d -m u::rwx,g::rx,o::- logs

Read the setfacl / getfacl manual pages for more info.

To restore (remove the access control lists), run the following:

cd $CATALINA_BASE
setfacl -b logs

. . . just my two cents
/mde/


Thanks again!


On Mon, Dec 16, 2013 at 7:25 PM, Mark Eggers <its_toas...@yahoo.com> wrote:

On 12/16/2013 4:04 PM, Chris Wise wrote:

Hi,



I’m wondering if there is a way to force Tomcat to set permissions on log
files when they’re created?  It seems as though this would be something
defined in the logging.properties file, but it doesn’t seem like it’s an
option.



I want the permissions of all log files created (on server startup/log
rollover) to be 640.  The only way I can think of doing this is either
adding the command to the startup script, or by running a cron job every
hour or so.  However, if there is a way to make sure the log files are
never more permissive than 640, that would be greatly preferable.



Thank you,


Chris


1. Create a setenv.sh file in $CATALINA_BASE/bin.
2. Add the following:

#!/bin/bash
umask 0026

Seems to work for me - quickly tested on Fedora 19, Tomcat 7.0.42, JRE
1.7.0_45.

. . . just my two cents
/mde/


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

Reply via email to