Commit 92c27574 authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

Only pass permission bits to Chmod.

parent 401ec6aa
...@@ -145,7 +145,8 @@ func (me *FileSystemConnector) SetAttr(header *InHeader, input *SetAttrIn) (out ...@@ -145,7 +145,8 @@ func (me *FileSystemConnector) SetAttr(header *InHeader, input *SetAttrIn) (out
} }
if input.Valid&FATTR_MODE != 0 { if input.Valid&FATTR_MODE != 0 {
err = mount.fs.Chmod(fullPath, input.Mode) permissionMask := uint32(07777)
err = mount.fs.Chmod(fullPath, input.Mode & permissionMask)
} }
if err == OK && (input.Valid&FATTR_UID != 0 || input.Valid&FATTR_GID != 0) { if err == OK && (input.Valid&FATTR_UID != 0 || input.Valid&FATTR_GID != 0) {
// TODO - can we get just FATTR_GID but not FATTR_UID ? // TODO - can we get just FATTR_GID but not FATTR_UID ?
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment