diff --git a/bureau/class/m_dom.php b/bureau/class/m_dom.php index 184dcc90..21436e9c 100644 --- a/bureau/class/m_dom.php +++ b/bureau/class/m_dom.php @@ -965,7 +965,7 @@ class m_dom { $db->next_record(); if ($db->f('create_tmpdir')) { if (! is_dir($dest_root . "/tmp")) { - if(!mkdir($dest_root . "/tmp")){ + if(!mkdir($dest_root . "/tmp",0770,true)){ $err->raise("dom",_("Cannot write to the destination folder")); } } diff --git a/bureau/class/m_quota.php b/bureau/class/m_quota.php index 95d939ee..ba0fc6e7 100644 --- a/bureau/class/m_quota.php +++ b/bureau/class/m_quota.php @@ -185,7 +185,7 @@ class m_quota { exec("sudo /usr/lib/alternc/quota_edit $cuid $size &> /dev/null &"); // Now we check that the value has been written properly : exec("sudo /usr/lib/alternc/quota_get $cuid &> /dev/null &",$a); - if ($size!=$a[1]) { + if (!isset($a[1]) || $size!=$a[1]) { $err->raise("quota",_("Error writing the quota entry!")); return false; }