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

Add utiity function to change permissions of user files created in a layer #4

Open
diegoferigo opened this issue Sep 12, 2019 · 1 comment
Assignees

Comments

@diegoferigo
Copy link
Owner

Commit 34f3ae9 introduced an initial support to handling better the permissions of files and folder that are used by the runtime user.

The resources chown is always demanded to downstream images. To streamline this operation we should introduce a new utility function that takes a folder and changes the group owner of all the files that are not already owned by the runtimeusers group.

Note that we have to filter the files with find -group root because chowning again a file in a layer would result in a dummy modification belonging to that layer. This operation would mark that file as modified (even if it was only touched by chown), making the image size increase without any reason.

@diegoferigo diegoferigo self-assigned this Sep 12, 2019
@diegoferigo
Copy link
Owner Author

diegoferigo commented Aug 24, 2021

As a workaround, if a RUN statement creates resources that the runtime users has to access in r/w, using the following pattern prevents chowning:

USER root:runtimeusers
RUN # ...
USER root:root

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

1 participant