Issue
I have some trouble with this situation:
everytime I create a new pipeline job ( entitled "pipeline"), the sh
step won't work even with simple command like ls
or pwd
and it returns this log:
sh: 1: /var/jenkins_home/workspace/pipeline@tmp/durable-34c21b81/script.sh: Permission denied
Any suggestions?
Solution
I guess you use
stage(name){
sh ./runSomething
}
Jenkins always uses to user jenkins for running scripts. There are some possibilities:
- Jenkins is running with a different user, maybe you start it with some other user.
- Something went running when installing jenkins, check that you have a jenkins user
Answered By - Torsten
Answer Checked By - Robin (JavaFixing Admin)