https://www.jianshu.com/p/181dfb259dc7
In recent need to do shell script jenkins, due to the Jenkins online before the default installation, so jenkins jenkins set the default user permissions
If you are performing a root user command, the newspaper permission errors
So to replace the root user jenkins
Change following steps:
- First, find the directory jenkins online installation, and then perform
chown -R root:root xxxx
root@ubuntu:/usr/share# find / -name "jenkins" find: ‘/proc/13931’: No such file or directory /var/lib/jenkins /var/log/jenkins /var/cache/jenkins /run/jenkins /etc/default/jenkins /etc/init.d/jenkins /etc/logrotate.d/jenkins /usr/share/jenkins /usr/share/doc/jenkins
- Edit the file / etc / default / jenkins
JENKINS_USER=root
JENKINS_GROUP=root
- Start jenkins Service
root@ubuntu:/usr/share# /etc/init.d/jenkins Correct java version found Usage: /etc/init.d/jenkins {start|stop|status|restart|force-reload}
- Log in to see if the browser ok