Added sticky GID permissions (#1615)

This commit is contained in:
Mafoo
2016-05-26 04:51:41 +01:00
committed by FusionPBX
parent 3ce93c654c
commit a8b667cd0b
14 changed files with 25 additions and 25 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'],0755,true);
mkdir($_SESSION['switch']['dialplan']['dir']."/".$row['dialplan_context'],2755,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'],0755,true);
mkdir($_SESSION['switch']['dialplan']['dir']."/public/".$_SESSION['domains'][$row['domain_uuid']]['domain_name'],2755,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'],0755,true);
mkdir($_SESSION['switch']['dialplan']['dir']."/".$row['dialplan_context'],2755,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,0775,true); }
if (!is_readable($profile_dir)) { mkdir($profile_dir,2775,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,0775,true); }
if (!is_readable($profile_dir.'/'.$sip_profile_name)) { mkdir($profile_dir.'/'.$sip_profile_name,2775,true); }
} //end foreach
unset($sql, $result, $row_count);