Skip to content

Commit

Permalink
Use uid/gid in file and directory creation
Browse files Browse the repository at this point in the history
  • Loading branch information
vitalif committed Oct 24, 2024
1 parent 8198a6a commit 233b1f9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions internal/goofys_fuse.go
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ func (fs *GoofysFuse) CreateFile(
return err
}

inode.setFileMode(op.Mode)
inode.SetAttributes(nil, &op.Mode, nil, &op.OpContext.Uid, &op.OpContext.Gid)

op.Entry.Child = inode.Id
op.Entry.Attributes = inode.InflateAttributes()
Expand Down Expand Up @@ -609,7 +609,7 @@ func (fs *GoofysFuse) MkNode(
fh.Release()
}
inode.Attributes.Rdev = op.Rdev
inode.setFileMode(op.Mode)
inode.SetAttributes(nil, &op.Mode, nil, &op.OpContext.Uid, &op.OpContext.Gid)

op.Entry.Child = inode.Id
op.Entry.Attributes = inode.InflateAttributes()
Expand Down Expand Up @@ -651,6 +651,7 @@ func (fs *GoofysFuse) MkDir(
} else {
inode.Attributes.Mode = os.ModeDir | fs.flags.DirMode
}
inode.SetAttributes(nil, nil, nil, &op.OpContext.Uid, &op.OpContext.Gid)

op.Entry.Child = inode.Id
op.Entry.Attributes = inode.InflateAttributes()
Expand Down

0 comments on commit 233b1f9

Please sign in to comment.