Browse Source

Merge pull request #1764 from danlsgiga/handle-umask

Use provided umask on mount
pull/1778/head
Chris Lu 4 years ago
committed by GitHub
parent
commit
5f72c388bc
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      weed/command/mount_std.go

4
weed/command/mount_std.go

@ -100,9 +100,9 @@ func RunMount(option *MountOptions, umask os.FileMode) bool {
uid, gid := uint32(0), uint32(0) uid, gid := uint32(0), uint32(0)
mountMode := os.ModeDir | 0777 mountMode := os.ModeDir | 0777
if err == nil { if err == nil {
mountMode = os.ModeDir | fileInfo.Mode()
mountMode = os.ModeDir | os.FileMode(0777)&^umask
uid, gid = util.GetFileUidGid(fileInfo) uid, gid = util.GetFileUidGid(fileInfo)
fmt.Printf("mount point owner uid=%d gid=%d mode=%s\n", uid, gid, fileInfo.Mode())
fmt.Printf("mount point owner uid=%d gid=%d mode=%s\n", uid, gid, mountMode)
} else { } else {
fmt.Printf("can not stat %s\n", dir) fmt.Printf("can not stat %s\n", dir)
return false return false

Loading…
Cancel
Save