mirror of https://github.com/statping/statping
Merge 6955545648
into fd889a14c0
commit
339eac2e6d
|
@ -31,7 +31,7 @@ func DirWritable(path string) (bool, error) {
|
||||||
return false, errors.New("unable to get stat")
|
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 false, errors.New("user doesn't have permission to write to this directory")
|
||||||
}
|
}
|
||||||
return true, nil
|
return true, nil
|
||||||
|
|
Loading…
Reference in New Issue