mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-03-06 16:48:43 +00:00
Added sticky GID permissions (#1615)
This commit is contained in:
@@ -175,7 +175,7 @@
|
||||
throw new Exception("recursive_copy() source directory '".$src."' does not exist.");
|
||||
}
|
||||
if (!is_dir($dst)) {
|
||||
if (!mkdir($dst)) {
|
||||
if (!mkdir($dst,2770,true)) {
|
||||
throw new Exception("recursive_copy() failed to create destination directory '".$dst."'");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user