Permission denied returned from a container due to uid used = 1000

13 views
Skip to first unread message

Charles Moulliard

unread,
Jun 16, 2021, 4:05:23 PMJun 16
to Jenkins Users
Hi

One of our container is reporting a permission denied as git cannot write a file on the filesystem mounted. As the uid used during the pod creation to allow the jenkins jnlp client to work correctly is 1000, what should we do to design correctly the image of that container to be able to give write permission even when the pod created will use as uid 1000 ?

Cheers

Charles

uday kiran

unread,
Jun 16, 2021, 4:14:44 PMJun 16
to jenkins...@googlegroups.com
Have you tried -u root while running the container?

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/b973f0bc-210e-4a49-aaca-3936ada9b57cn%40googlegroups.com.

Charles Moulliard

unread,
Jun 17, 2021, 12:43:33 AMJun 17
to Jenkins Users
No as the container is not launched using docker but using jenkins kubernetes plugin as a pod where the UID needed is 1000: https://github.com/jenkinsci/kubernetes-plugin#pipeline-sh-step-hangs-when-multiple-containers-are-used

Anderson Cruz

unread,
Jun 17, 2021, 11:43:38 AMJun 17
to jenkins...@googlegroups.com
Hello,

I had the same issue. Tried to force dockerfile and unix files fo force Umask but always some files belongs to user and group different from Jenkins Agent connected. 
Looks like a cascade shell inside Container invokes and overwrite 055 umask and ignore my directives ( or it's not propaged ).

My solution was all my nodes outside NIS system and using default jenkins user 1000 to connect.

Anderson Cruz


Reply all
Reply to author
Forward
0 new messages