diff options
Diffstat (limited to 'src/globals.php')
| -rwxr-xr-x | src/globals.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/globals.php b/src/globals.php index 952533e..d49a3c7 100755 --- a/src/globals.php +++ b/src/globals.php @@ -43,10 +43,10 @@ function filedownload($oid,$fname,$msg='') { function dirrec($dir, $user, $group, $dirPermissions, $filePermissions, $avoid=array()) { $ds = DIRECTORY_SEPARATOR; if($ds=="") $ds = "/"; - chown($dir, $user); - chgrp($dir, $group); + if(chown($dir, $user) === false) echo "cannot chown $dir\n"; + if(chgrp($dir, $group) === false) echo "cannot chgrp $dir\n"; if(is_dir($dir)) { - chmod($dir, $dirPermissions); + if(chmod($dir, $dirPermissions) === false) echo "cannot chmod $dir\n"; if(($dp = opendir($dir)) === false) return; while($file = readdir($dp)) { if (($file == ".") || ($file == "..")) @@ -63,7 +63,7 @@ function dirrec($dir, $user, $group, $dirPermissions, $filePermissions, $avoid=a } closedir($dp); } else { - chmod($dir, $filePermissions); + if(chmod($dir, $filePermissions)=== false) echo "cannot chmod $dir\n"; } } |