aboutsummaryrefslogtreecommitdiff
path: root/internal/fusefrontend/fs.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/fusefrontend/fs.go')
-rw-r--r--internal/fusefrontend/fs.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/internal/fusefrontend/fs.go b/internal/fusefrontend/fs.go
index 640c45d..9ae57fa 100644
--- a/internal/fusefrontend/fs.go
+++ b/internal/fusefrontend/fs.go
@@ -145,7 +145,12 @@ func (fs *FS) Create(path string, flags uint32, mode uint32, context *fuse.Conte
return nil, fuse.ToStatus(err)
}
}
-
+ if fs.args.PreserveOwner {
+ err = fd.Chown(int(context.Owner.Uid), int(context.Owner.Gid))
+ if err != nil {
+ tlog.Warn.Printf("PreserveOwner: Chown failed: %v", err)
+ }
+ }
return NewFile(fd, writeOnly, fs.contentEnc)
}