Skip to content

fix: update ownership of user homedir #238

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

Merged
merged 4 commits into from
Jun 14, 2024
Merged

Conversation

johnstcn
Copy link
Member

@johnstcn johnstcn commented Jun 14, 2024

Fixes #229

If a user mounts a Docker volume into /home/$USER, Docker will automatically assign permissions root:root to it as the envbuilder container runs as root by default. The resulting container will then have /home/$USER owned by root:root. The user will be unable to write any files there until they manually fix the permissions, which would require root privileges.

This PR adds a step to fix ownership of /home/$USER to the uid:gid we get from UserInfo.

@johnstcn johnstcn self-assigned this Jun 14, 2024
@johnstcn johnstcn requested review from mtojek and BrunoQuaresma June 14, 2024 11:51
Copy link
Member

@mtojek mtojek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@johnstcn johnstcn merged commit de6fc15 into main Jun 14, 2024
4 checks passed
@johnstcn johnstcn deleted the cj/fix-homedir-permissions branch June 14, 2024 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

usability: fix ownership of Docker volume mounts to /home
2 participants