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 new functions for faster permissions setting #332

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kierenevans
Copy link
Collaborator

  • Add common methods to set permissions so we can extend it in the future to include setfacl if possible.
  • Use find to speed up permissions setting by finding files and directories not owned by the right user/group or not the right permissions - this helps a lot when using volumes!

andytson-inviqa added a commit that referenced this pull request Aug 23, 2017
Assumes for facl/stickybit that all users are umask 0002

It doesn't have the performance improvements of #332 yet, though I'm unsure if that's possible with setfacl
andytson-inviqa added a commit that referenced this pull request Aug 23, 2017
Assumes for facl/stickybit that all users are umask 0002

It doesn't have the performance improvements of #332 yet, though I'm unsure if that's possible with setfacl
@sroze
Copy link
Member

sroze commented Sep 9, 2017

That's a very good idea! What's blocking this PR?

kierenevans pushed a commit that referenced this pull request Sep 14, 2017
Assumes for facl/stickybit that all users are umask 0002

It doesn't have the performance improvements of #332 yet, though I'm unsure if that's possible with setfacl
if [ "$IS_CHOWN_FORBIDDEN" != 'true' ]; then
find "${OWNERSHIP_PATH[@]}" \( ! -user "${USER}" -or ! -group "${GROUP}" \) -exec chown "${USER}:${GROUP}" {} +
fi
do_read_write_permissions "${OWNERSHIP_PATH[@]}" "${ALLOW_GROUP_WRITE}"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This doesn't pass through the paths correctly to do_read_write_permissions, only the first one.

kierenevans pushed a commit that referenced this pull request Sep 25, 2017
Assumes for facl/stickybit that all users are umask 0002

It doesn't have the performance improvements of #332 yet, though I'm unsure if that's possible with setfacl
@sroze
Copy link
Member

sroze commented Jan 8, 2018

@kierenevans do you think you'd have some time at some point to go forward with this issue? Waiting a long time at every container start on the chown -R build:build /app/ command is quite a disruption on projects.

kierenevans pushed a commit that referenced this pull request Mar 17, 2018
Assumes for facl/stickybit that all users are umask 0002

It doesn't have the performance improvements of #332 yet, though I'm unsure if that's possible with setfacl
@kierenevans kierenevans changed the base branch from master to main November 5, 2020 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants