I got the permissions wrong (#1616)

it should have been in octal mod (leading 0)
also updated the fax application as it needs the stickygid too
This commit is contained in:
Mafoo
2016-05-26 12:55:46 +01:00
committed by FusionPBX
parent 86c4742347
commit 71525c26b0
17 changed files with 42 additions and 59 deletions

View File

@@ -991,12 +991,12 @@ function save_dialplan_xml() {
$dialplan_filename = $dialplan_order."_v_".$dialplan_name.".xml";
if (strlen($row['dialplan_context']) > 0) {
if (!is_dir($_SESSION['switch']['dialplan']['dir']."/".$row['dialplan_context'])) {
mkdir($_SESSION['switch']['dialplan']['dir']."/".$row['dialplan_context'],2755,true);
mkdir($_SESSION['switch']['dialplan']['dir']."/".$row['dialplan_context'],02770,true);
}
if ($row['dialplan_context'] == "public") {
if (count($_SESSION['domains']) > 1 && strlen($row['domain_uuid']) > 0) {
if (!is_dir($_SESSION['switch']['dialplan']['dir']."/public/".$_SESSION['domains'][$row['domain_uuid']]['domain_name'])) {
mkdir($_SESSION['switch']['dialplan']['dir']."/public/".$_SESSION['domains'][$row['domain_uuid']]['domain_name'],2755,true);
mkdir($_SESSION['switch']['dialplan']['dir']."/public/".$_SESSION['domains'][$row['domain_uuid']]['domain_name'],02770,true);
}
file_put_contents($_SESSION['switch']['dialplan']['dir']."/public/".$_SESSION['domains'][$row['domain_uuid']]['domain_name']."/".$dialplan_filename, $tmp);
}
@@ -1006,7 +1006,7 @@ function save_dialplan_xml() {
}
else {
if (!is_dir($_SESSION['switch']['dialplan']['dir']."/".$row['dialplan_context'])) {
mkdir($_SESSION['switch']['dialplan']['dir']."/".$row['dialplan_context'],2755,true);
mkdir($_SESSION['switch']['dialplan']['dir']."/".$row['dialplan_context'],02770,true);
}
file_put_contents($_SESSION['switch']['dialplan']['dir']."/".$row['dialplan_context']."/".$dialplan_filename, $tmp);
}
@@ -1383,7 +1383,7 @@ if (!function_exists('save_sip_profile_xml')) {
// make profile dir if needed
$profile_dir = $_SESSION['switch']['conf']['dir']."/sip_profiles";
if (!is_readable($profile_dir)) { mkdir($profile_dir,2775,true); }
if (!is_readable($profile_dir)) { mkdir($profile_dir,02770,true); }
//get the global variables
global $domain_uuid;
@@ -1448,7 +1448,7 @@ if (!function_exists('save_sip_profile_xml')) {
}
//if the directory does not exist then create it
if (!is_readable($profile_dir.'/'.$sip_profile_name)) { mkdir($profile_dir.'/'.$sip_profile_name,2775,true); }
if (!is_readable($profile_dir.'/'.$sip_profile_name)) { mkdir($profile_dir.'/'.$sip_profile_name,02770,true); }
} //end foreach
unset($sql, $result, $row_count);