devpod icon indicating copy to clipboard operation
devpod copied to clipboard

UID in container is not updated to match the host

Open rickyjames35 opened this issue 1 year ago • 3 comments

What happened?
While testing DevPod I've noticed that the UID of the remoteUser does not match the UID of the host user. This causes the classic file permission issues between the host and the container.

What did you expect to happen instead?
The UID of the container to match the UID of the host user.

How can we reproduce the bug? (as minimally and precisely as possible)
My UID on my host is very large due to logins being controlled by our IT department / active directory. uid=1788609210 gid=1788600513 I suspect this may have something to do with it. I'm using the default out of the box vscode-remote-try-cpp sample that I setup through the DevPod GUI using the create workspace "Or select one of our quickstart example". When I ssh in or connect via VS Code I run id and see uid=1000(vscode) gid=1000(vscode) groups=1000(vscode),999(vcpkg). When I cd to it on my host and run ~/.devpod/agent/contexts/default/workspaces/vscode-remote-try-cpp$ ls -al I get:

drwxr-xr-x 3 ricky domain^users 4096 Aug  9 22:10 .
drwxr-xr-x 3 ricky domain^users 4096 Aug  9 22:10 ..
drwxr-xr-x 5              1000         1000 4096 Aug  9 22:10 content
-rw-r--r-- 1 ricky domain^users 1155 Aug  9 22:14 workspace.json

You can see the issue is the content workspace is owned by a non-existing user on my host giving me file permission issues. I've played around with this outside of the sample setting the remoteUser and updateRemoteUserUID to true (which it should already default to according to the documentation https://containers.dev/implementors/json_reference/) but have had no luck.

Local Environment:

  • DevPod Version: v0.3.4
  • Operating System: Ubuntu 22.04
  • ARCH of the OS: AMD64

DevPod Provider:

  • Local/remote provider: docker

rickyjames35 avatar Aug 10 '23 05:08 rickyjames35

This could be related: https://github.com/loft-sh/devpod/pull/551

rickyjames35 avatar Aug 10 '23 05:08 rickyjames35

Hey @rickyjames35 :wave: , Thanks for creating the issue. As you have correctly identified, we already have been working on a fix for this. :slightly_smiling_face: Currently, we are testing the fix on new as well as existing setups to ensure we are not making any breaking changes. I will tag this issue as well to that PR so that you are notified when it gets merged.

neogopher avatar Aug 10 '23 06:08 neogopher

@neogopher any reason the related pull request got closed?

euven avatar Apr 16 '24 23:04 euven