Eido Shack Eido Shack - 1 year ago 135
Apache Configuration Question

How to change file permission for apache log rotation

From my linux server, I deployed one web application on tomcat server. And I configured log4j to write log and rotate every hour. But when it create new log every times, it use "640" file permission by default.

rw-r----- 1 myuser myuser 664 Jun 6 11:00 mylog.log

I am not quite sure where the configuration did for log rotation with 640 permission. I didn't define in my log4j configuration.

Please kindly advise me where I can change file permission for newly log rotation of my log4j files?


Answer Source

File permissions are determined by the tomcat7 user's umask - there's no way to change it in log4j itself.


Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download