Skip to content
This repository has been archived by the owner on Sep 6, 2022. It is now read-only.

Commit

Permalink
Fix root directory permissions (#47)
Browse files Browse the repository at this point in the history
This fix allow non-root users to write to the mount
when using non-root uid,gid mount options.
  • Loading branch information
stas2k authored and harshavardhana committed Aug 29, 2017
1 parent b0d9605 commit 7f5c3d2
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions fs/fs.go
Original file line number Diff line number Diff line change
Expand Up @@ -334,11 +334,13 @@ func (mfs *MinFS) NextSequence(tx *meta.Tx) (sequence uint64, err error) {
// Root is the root folder of the MinFS mountpoint
func (mfs *MinFS) Root() (fs.Node, error) {
return &Dir{
dir: nil,

dir: nil,
mfs: mfs,
Mode: os.ModeDir | 0555,
Path: "",

UID: mfs.config.uid,
GID: mfs.config.gid,
Mode: os.ModeDir | 0750,
}, nil
}

Expand Down

0 comments on commit 7f5c3d2

Please sign in to comment.