aboutsummaryrefslogtreecommitdiff
path: root/weed/command/mount_std.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2019-03-10 19:45:40 -0700
committerChris Lu <chris.lu@gmail.com>2019-03-10 19:45:40 -0700
commit6fe071175dec7bb7db482dfb8506e9471d4a9e6f (patch)
tree02734226c457e3473f751622c0c1ec2f1902916e /weed/command/mount_std.go
parentad08a52ab65855ccc1b1470be3cdea94b012608c (diff)
downloadseaweedfs-6fe071175dec7bb7db482dfb8506e9471d4a9e6f.tar.xz
seaweedfs-6fe071175dec7bb7db482dfb8506e9471d4a9e6f.zip
mount: add option to disable allow others
fix https://github.com/chrislusf/seaweedfs/issues/877
Diffstat (limited to 'weed/command/mount_std.go')
-rw-r--r--weed/command/mount_std.go13
1 files changed, 8 insertions, 5 deletions
diff --git a/weed/command/mount_std.go b/weed/command/mount_std.go
index 3e4249bfc..2b274e200 100644
--- a/weed/command/mount_std.go
+++ b/weed/command/mount_std.go
@@ -56,8 +56,7 @@ func runMount(cmd *Command, args []string) bool {
util.SetupProfiling(*mountCpuProfile, *mountMemProfile)
- c, err := fuse.Mount(
- *mountOptions.dir,
+ options := []fuse.MountOption{
fuse.VolumeName("SeaweedFS"),
fuse.FSName("SeaweedFS"),
fuse.Subtype("SeaweedFS"),
@@ -67,13 +66,17 @@ func runMount(cmd *Command, args []string) bool {
fuse.AutoXattr(),
fuse.ExclCreate(),
fuse.DaemonTimeout("3600"),
- fuse.AllowOther(),
fuse.AllowSUID(),
fuse.DefaultPermissions(),
- fuse.MaxReadahead(1024*128),
+ fuse.MaxReadahead(1024 * 128),
fuse.AsyncRead(),
fuse.WritebackCache(),
- )
+ }
+ if *mountOptions.allowOthers {
+ options = append(options, fuse.AllowOther())
+ }
+
+ c, err := fuse.Mount(*mountOptions.dir, options...)
if err != nil {
glog.Fatal(err)
return false