mirror of https://github.com/k3s-io/k3s
Merge pull request #73533 from babiel/fix-fsgroup-directory-permissions
Ensure directories are executable for fsGrouppull/564/head
commit
6fc9a72f58
|
@ -28,8 +28,9 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
rwMask = os.FileMode(0660)
|
rwMask = os.FileMode(0660)
|
||||||
roMask = os.FileMode(0440)
|
roMask = os.FileMode(0440)
|
||||||
|
execMask = os.FileMode(0110)
|
||||||
)
|
)
|
||||||
|
|
||||||
// SetVolumeOwnership modifies the given volume to be owned by
|
// SetVolumeOwnership modifies the given volume to be owned by
|
||||||
|
@ -79,6 +80,7 @@ func SetVolumeOwnership(mounter Mounter, fsGroup *int64) error {
|
||||||
|
|
||||||
if info.IsDir() {
|
if info.IsDir() {
|
||||||
mask |= os.ModeSetgid
|
mask |= os.ModeSetgid
|
||||||
|
mask |= execMask
|
||||||
}
|
}
|
||||||
|
|
||||||
err = os.Chmod(path, info.Mode()|mask)
|
err = os.Chmod(path, info.Mode()|mask)
|
||||||
|
|
Loading…
Reference in New Issue