diff options
| author | Chris Lu <chris.lu@gmail.com> | 2020-06-24 23:26:54 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2020-06-24 23:26:54 -0700 |
| commit | e8e0d629af8301eb46a7e4a868b5a3c11c42dc11 (patch) | |
| tree | 5224bde5c7c014f4f83533332538ea9ed5b71ab7 | |
| parent | 32a1f22730bf456360cfdb7daf6585c8c47f3d9d (diff) | |
| download | seaweedfs-e8e0d629af8301eb46a7e4a868b5a3c11c42dc11.tar.xz seaweedfs-e8e0d629af8301eb46a7e4a868b5a3c11c42dc11.zip | |
ensure correct file mode
| -rw-r--r-- | weed/filesys/filehandle.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/weed/filesys/filehandle.go b/weed/filesys/filehandle.go index 3386256f9..9b9df916c 100644 --- a/weed/filesys/filehandle.go +++ b/weed/filesys/filehandle.go @@ -6,6 +6,7 @@ import ( "io" "math" "net/http" + "os" "time" "github.com/chrislusf/seaweedfs/weed/filer2" @@ -190,7 +191,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(0666 &^ fh.f.wfs.option.Umask) + fh.f.entry.Attributes.FileMode = uint32(os.FileMode(fh.f.entry.Attributes.FileMode) &^ fh.f.wfs.option.Umask) fh.f.entry.Attributes.Collection = fh.dirtyPages.collection fh.f.entry.Attributes.Replication = fh.dirtyPages.replication } |
