Skip to content

Add new functions for faster permissions setting - #332

Open
kierenevans wants to merge 1 commit into
mainfrom
feature/add-new-functions-for-faster-permissions-setting
Open

Add new functions for faster permissions setting#332
kierenevans wants to merge 1 commit into
mainfrom
feature/add-new-functions-for-faster-permissions-setting

Conversation

@kierenevans

Copy link
Copy Markdown
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

sroze commented Sep 9, 2017

Copy link
Copy Markdown
Member

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
Copy Markdown
CollaboratorAuthor

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

sroze commented Jan 8, 2018

Copy link
Copy Markdown
Member

@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 mainNovember 5, 2020 11:33
Sign up for freeto 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

@kierenevans@sroze