mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
Restrict the dir and file permissions of the mounted volume
This commit is contained in:
parent
44210092c1
commit
4378c7ae8e
@ -208,11 +208,11 @@ func (b *azureFileMounter) SetUpAt(dir string, fsGroup *int64) error {
|
||||
if accountName, accountKey, err = b.util.GetAzureCredentials(b.plugin.host, b.pod.Namespace, b.secretName); err != nil {
|
||||
return err
|
||||
}
|
||||
os.MkdirAll(dir, 0750)
|
||||
os.MkdirAll(dir, 0700)
|
||||
|
||||
source := fmt.Sprintf("//%s.file.%s/%s", accountName, getStorageEndpointSuffix(b.plugin.host.GetCloudProvider()), b.shareName)
|
||||
// parameters suggested by https://azure.microsoft.com/en-us/documentation/articles/storage-how-to-use-files-linux/
|
||||
options := []string{fmt.Sprintf("vers=3.0,username=%s,password=%s,dir_mode=0777,file_mode=0777", accountName, accountKey)}
|
||||
options := []string{fmt.Sprintf("vers=3.0,username=%s,password=%s,dir_mode=0700,file_mode=0700", accountName, accountKey)}
|
||||
if b.readOnly {
|
||||
options = append(options, "ro")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user