Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Massive chown happening even with updateRemoteUserUID = false #7390

Closed
kyrofa opened this issue Oct 20, 2022 · 3 comments · Fixed by devcontainers/cli#248
Closed

Massive chown happening even with updateRemoteUserUID = false #7390

kyrofa opened this issue Oct 20, 2022 · 3 comments · Fixed by devcontainers/cli#248
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug containers Issue in vscode-remote containers verified Verification succeeded
Milestone

Comments

@kyrofa
Copy link

kyrofa commented Oct 20, 2022

  • VSCode Version: 1.72.0
  • Local OS Version: Ubuntu 18.04 (bionic)
  • Remote OS Version: Ubuntu 20.04 (focal)
  • Remote Extension/Connection Type: SSH/Containers/WSL/Server docker-compose
  • Logs:
<... snip ...>
Step 8/10 : RUN eval $(sed -n "s/${REMOTE_USER}:[^:]*:\([^:]*\):\([^:]*\):[^:]*:\([^:]*\).*/OLD_UID=\1;OLD_GID=\2;HOME_FOLDER=\3/p" /etc/passwd);       eval $(sed -n "s/\([^:]*\):[^:]*:${NEW_UID}:.*/EXISTING_USER=\1/p" /etc/passwd);       eval $(sed -n "s/\([^:]*\):[^:]*:${NEW_GID}:.*/EXISTING_GROUP=\1/p" /etc/group); if [ -z "$OLD_UID" ]; then              echo "Remote user not found in /etc/passwd ($REMOTE_USER).";    elif [ "$OLD_UID" = "$NEW_UID" -a "$OLD_GID" = "$NEW_GID" ]; then               echo "UIDs and GIDs are the same ($NEW_UID:$NEW_GID)."; elif [ "$OLD_UID" != "$NEW_UID" -a -n "$EXISTING_USER" ]; then          echo "User with UID exists ($EXISTING_USER=$NEW_UID).";         elif [ "$OLD_GID" != "$NEW_GID" -a -n "$EXISTING_GROUP" ]; then                 echo "Group with GID exists ($EXISTING_GROUP=$NEW_GID).";       else            echo "Updating UID:GID from $OLD_UID:$OLD_GID to $NEW_UID:$NEW_GID.";           sed -i -e "s/\(${REMOTE_USER}:[^:]*:\)[^:]*:[^:]*/\1${NEW_UID}:${NEW_GID}/" /etc/passwd;               if [ "$OLD_GID" != "$NEW_GID" ]; then                    sed -i -e "s/\([^:]*:[^:]*:\)${OLD_GID}:/\1${NEW_GID}:/" /etc/group;            fi;             chown -R $NEW_UID:$NEW_GID $HOME_FOLDER;        fi;
 ---> Running in ef3fc0580327
Updating UID:GID from 9999:9999 to 1000:1000.

Steps to Reproduce:

  1. Create a .devcontainer/devcontainer.json that species both "remoteUser": "<some user>" and "updateRemoteUserUID": false.
  2. Open the project with vscode and click the "reopen in container" button that pops up
  3. Notice the "Updating UID:GID from 9999:9999 to 1000:1000" (or similar) print and the fact that a chown is taking place on your home directory

For this project in particular, my home directory is massive. chowning it takes over ten minutes. I disabled this and have my own more selective chown elsewhere, but it seems a recent release started ignoring updateRemoteUserUID, is that true? How can I disable this?

@github-actions github-actions bot added the containers Issue in vscode-remote containers label Oct 20, 2022
@chrmarti chrmarti self-assigned this Oct 25, 2022
@chrmarti chrmarti added the bug Issue identified by VS Code Team member as probable bug label Oct 25, 2022
@chrmarti chrmarti added this to the October 2022 milestone Oct 25, 2022
chrmarti added a commit to devcontainers/cli that referenced this issue Oct 25, 2022
chrmarti added a commit to devcontainers/cli that referenced this issue Oct 25, 2022
@kyrofa
Copy link
Author

kyrofa commented Oct 25, 2022

Thank you, @chrmarti :) .

@aeschli
Copy link
Contributor

aeschli commented Oct 27, 2022

Waiting for the new dev containers release to verify...

@roblourens roblourens added author-verification-requested Issues potentially verifiable by issue author and removed author-verification-requested Issues potentially verifiable by issue author labels Oct 27, 2022
@vscodenpa
Copy link

This bug has been fixed in the latest pre-release!

@kyrofa, you can help us out by commenting /verified if things are now working as expected.

Happy Coding!

@aeschli aeschli added the verified Verification succeeded label Oct 28, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Dec 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug containers Issue in vscode-remote containers verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants