Allow statping to be executed with restricted scc, not only root

pull/970/head
iposadat 2021-03-05 15:51:14 +01:00
parent b6ca1a5c66
commit 6955545648
1 changed files with 1 additions and 1 deletions

View File

@ -31,7 +31,7 @@ func DirWritable(path string) (bool, error) {
return false, errors.New("unable to get stat")
}
if uint32(os.Geteuid()) != stat.Uid {
if uint32(os.Getgid()) != stat.Gid && uint32(os.Geteuid()) != stat.Uid {
return false, errors.New("user doesn't have permission to write to this directory")
}
return true, nil