Reputation: 3801
I want to change the default permissions for the logs created by tomcat from 640 to 644 and that would require to change the umask for tomcat.
The default umask for tomcat user is 027 and I would like to set it to 022.
Can I set a environment variable for tomcat7 in bin/setenv.sh for umask property ? I heard that tomcat8 has a property UMASK, but does version 7 supports this ?
Upvotes: 2
Views: 5928
Reputation: 6314
Tomcat 8 added:
if [ -z "$UMASK" ]; then
UMASK="0027"
fi
umask $UMASK
to catalina.sh
. This gives you the ability to change it by setting the UMASK
environment variable.
Tomcat 7 does not call umask
in catalina.sh
so setting UMASK
is not going to help you. What you can do however is add umask 0022
to setenv.sh
and do yourself the same thing tomcat 8 does.
Upvotes: 5