-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Labels
feature: docker in workspacesfeature: root accessroadmap item: root & dockerhttps://bit.ly/2XlgB5phttps://bit.ly/2XlgB5ptype: bugSomething isn't workingSomething isn't working
Description
UPDATE:
This problem is actually not just about setuid, but about permissions in general.
Follow this comment #3174 (comment) for an even simpler steps to reproduce the issue.
Describe the bug
In a workspace using sudo docker-up
and pulling a docker image, it has sudo with the correct setuid bit.
-rwsrwxrwx 1 root root 157192 Feb 2 2020 /usr/bin/sudo
But after timeout/restarting the workspace, the sudo in the image has the wrong setuid bit
-rwxr-xr-x 1 root root 157192 Feb 2 2020 /usr/bin/sudo
Steps to reproduce
I created a minimal setup to reproduce the behavior:
https://gitpod.io/#https://github.com/shaal/gitpod-restart-test
- Start the workspace
- The workspace will run
sudo docker-up
- The workspace will pull an image and display the image's
/usr/bin/sudo
permissions (ie.docker run -it --rm drud/ddev-webserver:v1.16.3 ls -l /usr/bin/sudo
) - The permission should be
-rwsrwxrwx
- Using https://gitpod.io/workspaces - Stop the current workspace (alternatively you can wait for the workspace to timeout)
- Start the same workspace again
- Run
docker run -it --rm drud/ddev-webserver:v1.16.3 ls -l /usr/bin/sudo
- Now the permission is wrong
-rwxr-xr-x
, it's missing the setuid bit.
- Please note that the issue happens with any image.
Expected behavior
The setuid bit should stay the same after restarting a workspace.
Additional information
Example repository
Metadata
Metadata
Assignees
Labels
feature: docker in workspacesfeature: root accessroadmap item: root & dockerhttps://bit.ly/2XlgB5phttps://bit.ly/2XlgB5ptype: bugSomething isn't workingSomething isn't working