mount: add umask option

related to https://github.com/chrislusf/seaweedfs/issues/978
This commit is contained in:
Chris Lu
2019-07-24 00:03:05 -07:00
parent 3f851feb59
commit 5956dfd08d
6 changed files with 16 additions and 5 deletions

View File

@@ -148,7 +148,7 @@ func (fh *FileHandle) Flush(ctx context.Context, req *fuse.FlushRequest) error {
fh.f.entry.Attributes.Gid = req.Gid
fh.f.entry.Attributes.Mtime = time.Now().Unix()
fh.f.entry.Attributes.Crtime = time.Now().Unix()
fh.f.entry.Attributes.FileMode = uint32(0770)
fh.f.entry.Attributes.FileMode = uint32(0777 &^ fh.f.wfs.option.Umask)
}
request := &filer_pb.CreateEntryRequest{