On Mon, Dec 18, 2017 at 1:11 PM, Chris Cheshire <yahoono...@gmail.com> 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/tomcat-1.pid"
>
> $CATALINA_HOME/bin/daemon.sh $*
>
>
> Where and to what do I set the umask such that uploaded files have at
> least group read permission?

Solved it. After digging through daemon.sh, I see it is adding
$JSVC_OPTS to the call to jsvc.
Doing some googling led me to
https://issues.apache.org/jira/browse/DAEMON-221, 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: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to