How to set default umask for Tomcat webdav servlet?

While this is completely a hack, open up tomcat/bin/startup.sh and set 'umask 0002' in it. You could also do this in catalina.sh, you get the idea - you could even find right where java launches in catalina.sh (search for "catalina.out") and put it directly above that logic block to ensure it's effective when java is let loose on your poor CPU.


You can create an environment file for tomcat:

In /usr/shared/tomcat8/binwhere 8 is your appropriate tomcat version, create setenv.sh file containing:

#!/bin/bash umask 0002