Skip to content

Conversation

@cbuto
Copy link
Collaborator

@cbuto cbuto commented Jan 24, 2022

Fixes helm/chartmuseum#524.

In order to support using securityContext.fsGroup to allow reading/writing charts to a directory on an NFS for example and not setting the owner to 1000 (to limit other users with that UID from having access), we can create the directories with 774 permissions. But we have to use os.Chmod in order to set the correct perms due to os.MkdirAll applying permissions before the umask (defaults directory permissions to 755).

@jdolitsky Based on the code, the intention here was to set the directory permissions to 777. I could keep that permission level and just apply the os.Chmod with that but I think denying others to write to the chart directory seems desirable. what do you think? There might be some context I'm missing here 👀

In order to support using securityContext.fsGroup to RW charts to a filesystem, we can create the directories with 774 permissions. We have to use os.Chmod in order to set the correct perms
Copy link
Collaborator

@jdolitsky jdolitsky left a comment

Choose a reason for hiding this comment

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

this lgtm, thanks @cbuto

@jdolitsky jdolitsky merged commit c8bcede into chartmuseum:main Jan 24, 2022
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.

securityContext: fsGroup insufficient permissions

2 participants