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

image file ownership and mode is too naive #529

Open
cyphar opened this issue Jan 31, 2024 · 1 comment
Open

image file ownership and mode is too naive #529

cyphar opened this issue Jan 31, 2024 · 1 comment

Comments

@cyphar
Copy link
Member

cyphar commented Jan 31, 2024

We create files in the image using standard os.Create and similar calls, resulting in the behaviour that new files created in an image layout directory are owned by the user running umoci with a mode determined by the umask that umoci happened to run with.

However, since umoci repack and umoci unpack almost always require sudo to operate, it seems that changing the ownership to match the ownership of something like index.json or the layout directory itself would make umoci a bit easier to use.

I noticed this when replying to #528.

@tych0
Copy link
Member

tych0 commented Jan 31, 2024

sudo exports SUDO_{G,U}ID, which is what I used to fix this type of thing in stacker.

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

No branches or pull requests

2 participants