Setting the umask of the jenkins process

大兔子大兔子 提交于 2019-12-10 12:47:03

问题


Our jenkins CI server (v1.499) runs tests that call URLs on the CI machine. The applications behind those URLs change the same temporary files as the unit test processes change, so those files need to be group writable. I fixed that for apache already, but totally fail with jenkins.

Modifying /etc/default/jenkins to include an umask 002 command does not help. I'm checking that with gdb after restarting the service.

So how can I change jenkins' umask setting?


回答1:


Set the umask by configuring the daemon, just add --umask=002 to the daemon args in /etc/init.d/jenkins:

DAEMON_ARGS="--name=$NAME --inherit --env=JENKINS_HOME=$JENKINS_HOME --output=$JENKINS_LOG --pidfile=$PIDFILE --umask=002"



回答2:


I had the same problems on Ubuntu 12.04.5

It seems they have changed the standard umask from 022 to 027 for more security

https://www.mail-archive.com/jenkinsci-commits@googlegroups.com/msg30397.html

So I have switched it back in my setup by changing /etc/default/jenkins to have UMASK=002 That solved my problem, maybe you did set it wrong, or forgot to restart jenkins.

Check the umask of the running deamon

ps ax | grep jenkins | grep umask




回答3:


If these tests run with Ant then you could try setting the umask in the ~/.antrc file which gets invoked on Ant's startup.



来源:https://stackoverflow.com/questions/14517348/setting-the-umask-of-the-jenkins-process

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!