mirror of https://github.com/statping/statping
Allow statping to be executed with restricted scc, not only root
parent
b6ca1a5c66
commit
6955545648
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue