-
Notifications
You must be signed in to change notification settings - Fork 3
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
Devcontainer user is assigned different uid/guid than host user #23
Comments
👋 thanks for reporting! can you clarify what you mean by "unable to save file edits due to permission issues"? e.g., where are these files located? additionally: did you hand-craft your i don't think there's a need to remove the |
That would be any file in my repo, e.g.
I started from the files generated by the devcontainer plugin for vscode pulling in your template but then made minor changes. Specifically, I
Please be aware that
Actually, this is an active issue for these images as well: |
ahh – i didn't see this PR when i was looking through given this is really an upstream issue, i'll keep an eye on when they accept the PR and rebuild these devcontainers once they do! (i don't think it's ideal to track these kinds of patches here, unless it turns ou the PR is going to take a while to be accepted (e.g., more than another week or so).
hmm? the directories i was referring to were system directories, like the TeXLive installation site. i wasn't referring to your mounted directories. i see now that the permissions issue has been non-existent for me because i typically work with macOS, which does UID/GID remapping differently than linux. |
in the meantime, for folks who might come here – the temporary fix appears to be:
FROM ghcr.io/jmuchovej/devcontainers/latex:2024
# Source: https://github.com/devcontainers/images/issues/1056#issuecomment-2160102633
RUN userdel -r ubuntu; usermod -u 1000 vscode; groupmod -g 1000 vscode @FelixZY can you confirm that this works, locally? |
The PR mentioned in #23 (comment) just got accepted, so I should be able to trigger a rebuild of the LaTeX 2024 container within the week. |
Apparently, since ubuntu 24.04, the ubuntu container ships with a pre-defined
ubuntu
user. This user uses uid/gid 1000 by default, which forces thevscode
user to use uid/gid 1001 instead. Since this does not match with my host user on linux, I'm getting a bunch of permission errors in the devcontainer.Steps to reproduce
$ id -a
)FROM ghcr.io/jmuchovej/devcontainers/latex:2024
Expected
No permissions issues.
Actual
Unable to save file edits due to permission issues.
Additional context
These indicate that
RUN touch /var/mail/ubuntu && chown ubuntu /var/mail/ubuntu && userdel -r ubuntu
should probably be added to the container as a workaround.The text was updated successfully, but these errors were encountered: