Added is_readable to permission check #258
This commit is contained in:
parent
ba42169397
commit
3f2a73181a
@ -121,13 +121,9 @@ function get_hashed_password($password) {
|
|||||||
|
|
||||||
function hasPermissions($path) {
|
function hasPermissions($path) {
|
||||||
|
|
||||||
/* assume that if running with the same uid as the owner of the directory it's ok */
|
if (is_readable($path)===true&&
|
||||||
//$stat = @stat($path);
|
is_writeable($path)===true) return true;
|
||||||
//if ($stat && ($stat['uid'] == getmyuid())) return true;
|
|
||||||
//if (substr(sprintf('%o', @fileperms($path)), -4)!=$permissions) return false;
|
|
||||||
//else return true;
|
|
||||||
|
|
||||||
if (is_writeable($path)) return true;
|
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user