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
skip permission checking when creating dir or files
Chris Lu793dd81ca2c8
diff --git a/weed/filer2/filer.go b/weed/filer2/filer.goindex 467f846edc..2d5920cd8a 100644--- a/weed/filer2/filer.go+++ b/weed/filer2/filer.go@@ -56,7 +56,7 @@ func (f *Filer) CreateEntry(entry *Entry) (error) {if dirFindErr != nil {return fmt.Errorf("findDirectory %s: %v", dirPath, dirFindErr)}- }else{+ } else {glog.V(4).Infof("found cached directory: %s", dirPath)}@@ -98,9 +98,13 @@ func (f *Filer) CreateEntry(entry *Entry) (error) {return fmt.Errorf("parent folder not found: %v", entry.FullPath)}+ /*if !hasWritePermission(lastDirectoryEntry, entry) {+ glog.V(0).Infof("directory %s: %v, entry: uid=%d gid=%d",+ lastDirectoryEntry.FullPath, lastDirectoryEntry.Attr, entry.Uid, entry.Gid)return fmt.Errorf("no write permission in folder %v", lastDirectoryEntry.FullPath)}+ */if err := f.store.InsertEntry(entry); err != nil {return fmt.Errorf("insert entry %s: %v", entry.FullPath, err)diff --git a/weed/filesys/dir.go b/weed/filesys/dir.goindex f0191533de..4383fe62d1 100644--- a/weed/filesys/dir.go+++ b/weed/filesys/dir.go@@ -84,6 +84,7 @@ func (dir *Dir) Mkdir(ctx context.Context, req *fuse.MkdirRequest) (fs.Node, errglog.V(1).Infof("mkdir: %v", request)if _, err := client.CreateEntry(ctx, request); err != nil {+ glog.V(0).Infof("mkdir %v: %v", request, err)return fmt.Errorf("make dir: %v", err)}