-
Notifications
You must be signed in to change notification settings - Fork 455
Description
What happened?
With the docker provider on linux, using podman (DOCKER_PATH=podman
) given a workspace mounted from a local folder with a devcontainer.json that contains:
then devpod up
will change the file ownership of the local files to the uid of the remote user in the container. This makes the files inaccessible on the host.
What did you expect to happen instead?
Workspace file ownership is not modified if they are mounted from the host. If they are mounted as a docker volume or cloned within the image modifying them would be fine.
How can we reproduce the bug? (as minimally and precisely as possible)
devpod up <path-to-local-workspace>
On the host
> ls -la <path-to-local-workspace>
ls: cannot open directory '<path-to-local-workspace>': Permission denied
> ls -la $(realpath <path-to-local-workspace>/..)
...
drwxr-x--- 5 101000 101000 4096 Jun 12 17:37 <workspace-folder>
My devcontainer.json
:
{
"image": "mcr.microsoft.com/devcontainers/base:ubuntu-24.04",
"updateRemoteUserUID": true,
"containerUser": "vscode"
}
Local Environment:
- DevPod Version: v0.6.15
- Operating System: linux
- ARCH of the OS: AMD64
DevPod Provider:
- Local/remote provider: docker
Anything else we need to know?
The permissions once modified by devpod then can only be fixed with podman unshare chown -R 0:0 <path-to-local-workspace>
or by the root user. Disovering the podman unshare
option is not easy, the user could easily believe their files are unrecoverable if they lack sudo access on the host.