我想爲tomcat8實例設置一個自定義的umask,試圖通過在systemd的tomcat單元中使用UMask指令來使其成爲好的方式,如here沒有運氣。通過tomcat.service設置爲tomcat8的umask
我想設置一個022的umask導致公司開發需要訪問的tomcat /應用程序日誌,他們是不是在同一組的tomcat的用戶....
瘋狂的事情是, systemd doc說:
控制文件模式創建掩碼。以八進制符號表示訪問模式。有關詳細信息,請參閱umask(2)。默認爲0022
但日誌(應用程序/ Tomcat)的設置爲640(而不是預期的755):
-rw-r----- 1 top top 21416 Feb 1 09:58 catalina.out
我的服務文件:
# 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
這個有什麼想法?
感謝
感謝輸入mjtecka我給它一個嘗試,只要我有時間,這,我現在轉到另一個問題,我會確保在這裏復出並接受你的答案,如果這樣的話! – Pier
這個答案是正確的,應該這樣標記。 systemd的UMask被tomcat忽略。此更改的工作原理,只需更改在catalina.sh – Tadgh