SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.
Go blob-storagecloud-drivedistributed-file-systemdistributed-storageerasure-codingfusehadoop-hdfshdfskuberneteslancelancedbobject-storageposixs3s3-storageseaweedfstiered-file-systemvector-search
mount: add option to disable allow others
Chris Lu6fe071175dec
diff --git a/weed/command/mount.go b/weed/command/mount.goindex e61f16783c..760c68e400 100644--- a/weed/command/mount.go+++ b/weed/command/mount.go@@ -17,6 +17,7 @@ type MountOptions struct {ttlSec *intchunkSizeLimitMB *intdataCenter *string+ allowOthers *bool}var (@@ -37,6 +38,7 @@ func init() {mountOptions.ttlSec = cmdMount.Flag.Int("ttl", 0, "file ttl in seconds")mountOptions.chunkSizeLimitMB = cmdMount.Flag.Int("chunkSizeLimitMB", 4, "local write buffer size, also chunk large files")mountOptions.dataCenter = cmdMount.Flag.String("dataCenter", "", "prefer to write to the data center")+ mountOptions.allowOthers = cmdMount.Flag.Bool("allowOthers", true, "allows other users to access the file system")mountCpuProfile = cmdMount.Flag.String("cpuprofile", "", "cpu profile output file")mountMemProfile = cmdMount.Flag.String("memprofile", "", "memory profile output file")}diff --git a/weed/command/mount_std.go b/weed/command/mount_std.goindex 3e4249bfc2..2b274e2008 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