mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 11:21:47 +00:00
Merge pull request #36386 from sjenning/fix-secret-file-mode
Automatic merge from submit-queue Avoid setting S_ISGID on files in volumes Some applications are having issues with setting the S_ISGID bit on files in volumes. We intend to do this for directories so that the group ID is inherited, but not files for which S_ISGID indicates madatory file locking https://linux.die.net/man/2/stat xref https://bugzilla.redhat.com/show_bug.cgi?id=1387306 @ncdc @derekwaynecarr @pmorie
This commit is contained in:
commit
193e2ae1d1
@ -71,7 +71,11 @@ func SetVolumeOwnership(mounter Mounter, fsGroup *int64) error {
|
||||
mask = roMask
|
||||
}
|
||||
|
||||
err = chmodRunner.Chmod(path, info.Mode()|mask|os.ModeSetgid)
|
||||
if info.IsDir() {
|
||||
mask |= os.ModeSetgid
|
||||
}
|
||||
|
||||
err = chmodRunner.Chmod(path, info.Mode()|mask)
|
||||
if err != nil {
|
||||
glog.Errorf("Chmod failed on %v: %v", path, err)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user