tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Cheshire <>
Subject Re: file permission problem SOLVED
Date Tue, 19 Dec 2017 17:34:51 GMT
On Mon, Dec 18, 2017 at 1:11 PM, Chris Cheshire <> wrote:
> Since moving from a yum controlled installation of tomcat and starting
> tomcat via jsvc I have a problem with permissions of uploaded files.
> Now all files that are written by tomcat have permissions of 0600,
> where they used to be 0644. I need the to be group readable, world
> readable is not necessary.
> I tried setting the UMASK environment variable in my script that
> starts jsvc but that has no effect.
> #!/bin/sh
> export UMASK=0027
> export JAVA_HOME="/usr/lib/jvm/java-1.8.0"
> export TOMCAT_USER="sandbox1"
> export CATALINA_HOME="/usr/local/apache-tomcat-8.5.24"
> export CATALINA_BASE="/home/sandbox1/tomcat"
> export CATALINA_OUT="/var/log/catalina-1.out"
> export CATALINA_PID="/var/run/"
> $CATALINA_HOME/bin/ $*
> Where and to what do I set the umask such that uploaded files have at
> least group read permission?

Solved it. After digging through, I see it is adding
$JSVC_OPTS to the call to jsvc.
Doing some googling led me to, which unfortunately
is not documented in jsvc -help (I'll see what I can do to submit a
patch for that).

Thus, it is a matter of adding

export JSVC_OPTS="-umask 0027"

to the above script.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message