-
Notifications
You must be signed in to change notification settings - Fork 145
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
Capability to set filesystem permissions for mounted volumes #2125
Comments
@seifrajhi why not set the required permission in mount options, the volume permission can only be determined in the first mount with mount options.
|
We are using this shared volume in different pods(i.e deployments), and a part of these pods need root privilege and we have exception for those pods. However, when possible we want to use One more thing is that the |
@seifrajhi those mount options are per volume setting, if you have two pods that need different permissions, you could define two PVCs pointing to the same file share with different mountOptions. |
Thank you @andyzhangx, I thought that My context is that I have an Airflow application that mounts a volume called If I can create two PVCs that point to the same content in the file share with different |
@seifrajhi you could create two PVs, each PV would have different mountOptions, and bound to different PVC, that should work. Make sure the |
@andyzhangx, sure, I will do that thanks a lot. But this would defy the dynamic provisioning feature of StorageClasses, right ? which we leverage to create PVs on the fly. |
then you could define two storage classes with different mountOptions |
What happened:
I am not able to change the permissions of the files mounted using
azure-file-csi-persistent
in azure provider.My directory are getting mounted as root with 770 permissions, while I want my mounted files to have 750 permissions and
nonroot
user.I want to avoid ownership changes of the mount volume
/app
fromazure-file-csi-persistent
storage class inside my pod?I created the following in my Dockerfile:
However, it is mounted with
50000:root
ownership when I check inside the pod, which I think is inherited from CSI. Here is the CSI configuration:What you expected to happen:
I expected the
/app
directory to retain the1000:2000
ownership set in the Dockerfile, rather than being overridden by the CSI mount options.How to reproduce it:
Anything else we need to know?:
Any guidance on using
fsGroup
and/orfsGroupChangePolicy
to maintain the desired ownership would be greatly appreciated.Environment:
v1.29.8
kubectl version
):Client Version: v1.30.3
,Server Version: v1.28.13
uname -a
):The text was updated successfully, but these errors were encountered: