반응형

How to run Jenkins under a different user in Linux [Redhat]
When I wanted to change the Jenkins user I first checked /etc/init.d/jenkins script.  There I found two important variables $JENKINS_CONFIG(=/etc/sysconfig/jenkins) and $JENKINS_USER. So if you want, you can change the JENKINS_USER variable in the /etc/init.d/jenkins file; but it is not the correct way to do.

To change the jenkins user, open the /etc/sysconfig/jenkins (in debian this file is created in /etc/default) and change the JENKINS_USER to whatever you want. Make sure that user exists in the system (you can check the user in the /etc/passwd file ).
**$JENKINS_USER="manula"**
Then change the ownership of the Jenkins home, Jenkins webroot and logs.
**chown -R manula:manula /var/lib/jenkins 
chown -R manula:manula /var/cache/jenkins
chown -R manula:manula /var/log/jenkins**
Then restarted the Jenkins jenkins and check the user has changed using a ps command 
/etc/init.d/jenkins restart
ps -ef | grep jenkins

반응형

'Tip & Tech > Linux | Unix' 카테고리의 다른 글

Apache AH00035 오류, Tomcat SSL Permission Denied  (0) 2019.07.15
Linux Shell MOTD(로그인 후 배너)  (0) 2019.07.15
GCC .so만들기  (0) 2010.10.21
PHP 확장모듈 만들기  (0) 2010.10.21
shell scripting - date 사용하기  (0) 2010.10.21

+ Recent posts