0

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?

Thanks, Tun

Eido Shack
  • 65
  • 2
  • 11

1 Answers1

1

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

https://serverfault.com/questions/152936/how-to-set-default-umask-for-tomcat-webdav-servlet

Community
  • 1
  • 1
Shmulik Klein
  • 3,754
  • 19
  • 34