Jenkins job running in kubernetes slave reporting permission denied writing to durable- folder

3/12/2019

Have been running Jenkins in Kubernetes successfully for a while.

Last night a new version of the docker image jenkins/jnlp-slave:alpine was pulled and subsequent to that the jenkins jobs have started reporting permission denied when trying to write to the folder e.g.: sh: 1: cannot create /home/jenkins/workspace/my-job@tmp/durable-1c5344be/output.txt: Permission denied

This appears to be down to the folder not having group write permission that the Jenkins user requires as it has uid of 10000 within the gradle pod.

How can I resolve this permissions issue?

For now I am working around the problem by reverting the above image to an earlier tag:

docker rmi jenkins/jnlp-slave:alpine
docker pull jenkins/jnlp-slave:3.27-1-alpine
docker tag jenkins/jnlp-slave:3.27-1-alpine jenkins/jnlp-slave:alpine
-- Aestel
docker
jenkins
kubernetes

0 Answers