diff options
| author | Chris Lu <chrislusf@users.noreply.github.com> | 2021-01-28 01:09:20 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-28 01:09:20 -0800 |
| commit | 5f72c388bcbd38477262ffc754b48485fdd087d0 (patch) | |
| tree | f343a8e42d25d763e4410a3196f33481e5ad0ed2 | |
| parent | 22e167bc8a30c1bc750ba5ffeae65700b07e85ab (diff) | |
| parent | d38613c49acbca55937770ebf3db79817a313a05 (diff) | |
| download | seaweedfs-5f72c388bcbd38477262ffc754b48485fdd087d0.tar.xz seaweedfs-5f72c388bcbd38477262ffc754b48485fdd087d0.zip | |
Merge pull request #1764 from danlsgiga/handle-umask
Use provided umask on mount
| -rw-r--r-- | weed/command/mount_std.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/weed/command/mount_std.go b/weed/command/mount_std.go index eaa66519e..8c6072255 100644 --- a/weed/command/mount_std.go +++ b/weed/command/mount_std.go @@ -100,9 +100,9 @@ func RunMount(option *MountOptions, umask os.FileMode) bool { uid, gid := uint32(0), uint32(0) mountMode := os.ModeDir | 0777 if err == nil { - mountMode = os.ModeDir | fileInfo.Mode() + mountMode = os.ModeDir | os.FileMode(0777)&^umask 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 { fmt.Printf("can not stat %s\n", dir) return false |
