Jenkins is being started with egid 0

Keywords: Jenkins - AWS - Technical issue - Permissions
Description:
We’re using bitnami-jenkins-2.204.5-0-linux-debian-9-x86_64-hvm-ebs-nami ami, and for some reason jenkins is being started, and runs pipelines as uid=1001(jenkins) gid=0(root) groups=0(root) while in the system it’s uid=1001(jenkins) gid=1002(jenkins) groups=1002(jenkins),999(docker).
This causes some problems for us - I’ve gone through the init scripts, got to cli.js and got stuck.
Is there a way to have jenkins running as, well, jenkins user with all the groups attached?

Support bundle is 5d2213ce-2371-f10d-0a12-95418562f67d if it helps in any way.

Hi @jakubm,

I reproduced what you mention on your first post, but I’m afraid I can not help you with your question. We have done some changes in the Jenkins image recently, so I’m notifying our Engineering Team for them to help you with this.

Regards,
Gonzalo

Thanks Gonzalo!

For any souls that might be facing the same problem the workaround would be to create /etc/systemd/system/docker.socket.d/override.conf with the following content:

    [Socket]
    SocketGroup=root

I know it’s not ideal but hey - jenkins’s already running with root gid :slight_smile:

1 Like

Hi @jakubm,

You should be able to modify the configuration logic to execute the Jenkins process with a different user, but I have to say that it is more complicated that what you are already proposing to do!

Thanks for sharing your solution, I’m sure users will benefit from it.

Best regards,
Andrés Bono.