Open aacebedo opened 3 days ago
In fact I checked the code and I think that UpdateRemoteUserUID
is not used by devpod. So permissions uid is never changed.
Maybe if this is implemented, the keep-id option may be not useful anymore.
Hey @aacebedo , thanks for reporting the issue and opening a PR! Will take a look at it soon. One more step to bridge the gap to the spec :)
Note I was not able to test it on a cloud setup. So I may have done some errors in the code on this aspect.
What happened?
There is an issue with uid and permissions settings when using podman. It is due to the addition of the
userns=keep-id
option that is now added automatically by devpod when podman is used (wihich is a good thing IMHO).This option makes podman to recopy the host user inside the container with the same uid. If one create a user inside the container with a uid different than the host user, devpod will not be able to change the uid of the remoteUser as the host user now already exists in the container.
However, devpod still chown everything with the initial remoteUser uid which was not changed and thus breaks all permissions on the host.
This behaviour is not exhibited when uid of host user and remote user are the same. In this case, podman does not create the user in the container and keep the already existing remoteuser. Devpod does not have anything to change then.
What did you expect to happen instead?
Devpod shall be able to change the uid of the remoteUser even if a user already exists.
How can we reproduce the bug? (as minimally and precisely as possible)
My
devcontainer.json
:test feature:
Ensure that host user does not have uid 10000
Local Environment:
DevPod Provider:
Anything else we need to know?