i'm using azure files as a volume for kubernetes, but i'm facing a problem with it.
i'm able to set permissions on the whole share but i can’t change permissions on a specific file/directory.
If i set the default permissions to the whole share (example 644 (rw/r/r)) and try to change this permissions on specific file (example Chmod 0644 file) chmod doesn’t take any effect it always the default permissions.
Even if i didn’t mention the default permission it will take 0777 and yet i can’t change permissions of file/directory inside the share.
i’ve done some research and i found that this feature is not yet implemented the source is from 2016 I hope this feature is enabled now?
Otherwise is there any other solution to propose ?
Regards,
Update
Many thanks @Charles Xu for your suggestion it's very useful. I used your preposition but let me explain my use case a little bit:
- I need to have different files permissions on the same directory because this directory is for SSH. I could change the permission of the folder .ssh so all the files inside it have 0644 but as u know i have to change the permission of the private key to 0600
It’s mandatory to change the permission on the private key otherwise SSH will not work.
-rw-r--r-- 1 userx userx 182 Oct 8 15:13 config
-rw-r--r-- 1 userx userx 1675 Oct 8 15:13 id_rsa
-rw-r--r-- 1 userx userx 409 Oct 8 15:13 id_rsa.pub