diff options
Diffstat (limited to 'weed/command/mount_std.go')
| -rw-r--r-- | weed/command/mount_std.go | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/weed/command/mount_std.go b/weed/command/mount_std.go index 1d1214266..0519ae7b8 100644 --- a/weed/command/mount_std.go +++ b/weed/command/mount_std.go @@ -27,6 +27,12 @@ func runMount(cmd *Command, args []string) bool { util.SetupProfiling(*mountCpuProfile, *mountMemProfile) + umask, umaskErr := strconv.ParseUint(*mountOptions.umaskString, 8, 64) + if umaskErr != nil { + fmt.Printf("can not parse umask %s", *mountOptions.umaskString) + return false + } + return RunMount( *mountOptions.filer, *mountOptions.filerMountRootPath, @@ -38,11 +44,12 @@ func runMount(cmd *Command, args []string) bool { *mountOptions.allowOthers, *mountOptions.ttlSec, *mountOptions.dirListingLimit, + os.FileMode(umask), ) } func RunMount(filer, filerMountRootPath, dir, collection, replication, dataCenter string, chunkSizeLimitMB int, - allowOthers bool, ttlSec int, dirListingLimit int) bool { + allowOthers bool, ttlSec int, dirListingLimit int, umask os.FileMode) bool { util.LoadConfiguration("security", false) @@ -146,6 +153,7 @@ func RunMount(filer, filerMountRootPath, dir, collection, replication, dataCente MountMode: mountMode, MountCtime: fileInfo.ModTime(), MountMtime: time.Now(), + Umask: umask, })) if err != nil { fuse.Unmount(dir) |
