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

Changing provisioned volume mode to 0777 #42

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

Conversation

hehesky
Copy link

@hehesky hehesky commented Jan 27, 2022

NFS Provisioner: Changing provisioned volume mode to 0777

Description of your changes:

Changing provisioned volume mode to 0777 by adding a chmod call after the dir is created

This is to allow non-root consumer pod to gain access to the volume. It is quite common now that pods are running as non-root user (sometimes even with restricted SCC). The consumer pod should be responsible for preparing the volume (i.e. changing the permission to proper values)

I also added on replace clause in go.mod otherwise it won't build (see #39).

Which issue is resolved by this Pull Request:
Resolves #

Resolves #22 and potentially a band-aid fix for #39

I've tested this change using a dev build running on Openshift 4.8 with portworx backing the server. With this change non-root pods are able to mount provisioned volume and gain access.

Checklist:

  • Commit Message Formatting: Commit titles and messages follow guidelines in the developer guide.
  • Skip Tests for Docs: Add the flag for skipping the build if this is only a documentation change. See here for the flag.
  • Skip Unrelated Tests: Add a flag to run tests for a specific storage provider. See test options.
  • Reviewed the developer guide on Submitting a Pull Request
  • Documentation has been updated, if necessary.
  • Unit tests have been added, if necessary.
  • Integration tests have been added, if necessary.
  • Pending release notes updated with breaking and/or notable changes, if necessary.
  • Upgrade from previous release is tested and upgrade user guide is updated, if necessary.
  • Code generation (make codegen) has been run to update object specifications, if necessary.

NFS Provisioner: Changing provisioned volume mode to 0777

Changing provisioned volume mode to 0777. This is to allow non-root consumer pod to gain access to the volume. The consumer pod should be responsible for preparing the volume (i.e. changing the permission to proper values). Also includes a band aid fix on go.mod for building 

Signed-off-by: Kaihua Zhou <Kaihua.Zhou@ibm.com>
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.

Description Mount failed. Permission denied
1 participant