mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
mount: fix k8s pvc mount directory permission
This commit is contained in:
parent
9b21ec27e4
commit
59e91e9c7e
|
@ -12,7 +12,6 @@ import (
|
||||||
"runtime"
|
"runtime"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"syscall"
|
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/seaweedfs/fuse"
|
"github.com/seaweedfs/fuse"
|
||||||
|
@ -92,9 +91,8 @@ func RunMount(option *MountOptions, umask os.FileMode) bool {
|
||||||
|
|
||||||
// detect mount folder mode
|
// detect mount folder mode
|
||||||
if *option.dirAutoCreate {
|
if *option.dirAutoCreate {
|
||||||
oldMask := syscall.Umask(0)
|
os.MkdirAll(dir, os.FileMode(0777)&^umask)
|
||||||
os.MkdirAll(dir, os.ModePerm&^umask)
|
os.Chmod(dir, os.FileMode(0777)&^umask)
|
||||||
syscall.Umask(oldMask)
|
|
||||||
}
|
}
|
||||||
mountMode := os.ModeDir | 0777
|
mountMode := os.ModeDir | 0777
|
||||||
fileInfo, err := os.Stat(dir)
|
fileInfo, err := os.Stat(dir)
|
||||||
|
|
Loading…
Reference in a new issue