Skip to content

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.

mount: auto created directory follow umask

Chris Luf0e325b6fce6
diff --git a/weed/filesys/wfs.go b/weed/filesys/wfs.go
index 8d46e0862f..0335d5d98d 100644
--- a/weed/filesys/wfs.go
+++ b/weed/filesys/wfs.go
@@ -88,7 +88,7 @@ func NewSeaweedFileSystem(option *Option) *WFS {
cacheUniqueId := util.Md5String([]byte(option.FilerGrpcAddress + option.FilerMountRootPath + util.Version()))[0:4]
cacheDir := path.Join(option.CacheDir, cacheUniqueId)
if option.CacheSizeMB > 0 {
- os.MkdirAll(cacheDir, 0755)
+ os.MkdirAll(cacheDir, os.FileMode(0777) &^ option.Umask)
wfs.chunkCache = chunk_cache.NewTieredChunkCache(256, cacheDir, option.CacheSizeMB)
}