netbrain / zwift

Easily zwift on linux
The Unlicense
238 stars 27 forks source link

Permission denied for groupmod with podman #95

Closed fandan closed 4 months ago

fandan commented 4 months ago

When I start the container I get the following error message:

++ id -u user
+ USER_UID=1000
++ id -g user
+ USER_GID=1000
+ '[' -n 1000 ']'
+ '[' 1000 -eq 1000 ']'
+ USER_UID=1000
+ '[' -n 1000 ']'
+ '[' 1000 -eq 1000 ']'
+ USER_GID=1000
+ usermod -o -u 1000 user
usermod: no changes
+ groupmod -o -g 1000 user
groupmod: Permission denied.
groupmod: cannot lock /etc/group; try again later.

I suspect this comes from using gosu in entrypoint.sh and removing the sudo param. gosu doesn't seem to be supported by podman. Few days ago zwift runs without problems.

netbrain commented 4 months ago

@hobeone ☝️, related to #94

hobeone commented 4 months ago

Will take a look but I suspect that it could be related to the line zwift.sh:

$([ "$CONTAINER_TOOL" = "podman" ] && echo '--userns=keep-id')

I don't think that's necessary anymore after the changes in #94. I've never used podman but looking at the docs I think either deleting it or setting it to the empty string might work.

My guess is that when you set --userns=keep-id entrypoint isn't running as root in the container as it does with docker.

@fandan could you give that a shot and see if it gets it working?

nibbles-bytes commented 4 months ago

Will take a look but I suspect that it could be related to the line zwift.sh:

$([ "$CONTAINER_TOOL" = "podman" ] && echo '--userns=keep-id')

I don't think that's necessary anymore after the changes in #94. I've never used podman but looking at the docs I think either deleting it or setting it to the empty string might work.

My guess is that when you set --userns=keep-id entrypoint isn't running as root in the container as it does with docker.

@fandan could you give that a shot and see if it gets it working?

I just tried removing that line in my podman setup and I was able to boot Zwift successfully.

fandan commented 4 months ago

@nibbles-bytes , @hobeone: Removing --userns=keep-id solved the problem. Now zwift is starting again. Thanks.