title: set umask for tomcat8 via tomcat.service
body: <p>I am trying to set a custom umask for a tomcat 8 instance, tried to make it the good way by using the UMask directive in systemd tomcat unit as seen <a href="https://www.freedesktop.org/software/systemd/man/systemd.exec.html#UMask=" rel="noreferrer">here</a> without luck.</p>
  
  <p>I'd like to set a 022 umask cause the company dev needs to access tomcat / application logs and they are not in the same group as the tomcat user....</p>
  
  <p>the crazy thing is that the systemd doc says :</p>
  
  <p><em>Controls the file mode creation mask. Takes an access mode in octal notation. See umask(2) for details. Defaults to 0022.</em></p>
  
  <p>But the logs (application / tomcat) are set to 640 (not the expected 755) :</p>
  
  <pre><code>-rw-r----- 1 top top 21416 Feb  1 09:58 catalina.out
  </code></pre>
  
  <p>My service file :</p>
  
  <pre><code># Systemd unit file for tomcat
  [Unit]
  Description=Apache Tomcat Web Application Container
  After=syslog.target network.target
  
  [...]
  
  User=top
  Group=top
  UMask=0022
  
  [Install]
  WantedBy=multi-user.target
  </code></pre>
  
  <p>Any thoughts about this ?</p>
  
  <p>Thanks</p>