Skip to content

Commit

Permalink
If user is 0, they should be able to write to any groups
Browse files Browse the repository at this point in the history
  • Loading branch information
kaovilai committed Nov 11, 2024
1 parent 1cfb814 commit 29587cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/plugin/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func isWriteable(log *logrus.Entry, info fs.FileInfo) bool {
log.Debugf("Detected Gid: %d", os.Getegid())

// Writable by group
if info.Mode().Perm()&(1<<4) > 0 && os.Getegid() == int(stat.Gid) {
if info.Mode().Perm()&(1<<4) > 0 && os.Getegid() == int(stat.Gid) || os.Getegid() == 0 {
return true
}

Expand Down

0 comments on commit 29587cc

Please sign in to comment.