[fix] #1540 browser incorrectly dealing with group permissions

This commit is contained in:
alban 2013-10-18 08:44:45 +00:00
parent e80e505f7f
commit 53d89c5016
1 changed files with 3 additions and 4 deletions

View File

@ -516,12 +516,11 @@ class m_bro {
// pour l'instant on se limite a "write" pour owner, puisque c'est le seul
// cas interessant compte tenu de la conf de Apache pour AlternC..
if ($perm[$i]['w']) {
$m = $m | 128;
if ($perm[$i]['w']) {
$m = $m | 0220; // ug+w
} else {
$m = $m ^ 128;
$m = $m ^ 0222; // ugo-w
}
$m = $m | ($perm[$i]['w'] ? 128 : 0); // 0600
chmod($absolute."/".$d[$i], $m);
if ($verbose) {
echo "chmod " . sprintf('%o', $m) . " file, was " . sprintf('%o', fileperms($absolute."/". $d[$i])). " -- " . $perm[$i]['w'];