Use FreeSWITCH to run mkdir so it inherits its own user and group permissions.

This commit is contained in:
markjcrane
2016-06-28 15:18:40 -06:00
parent bc46191440
commit bd23c78670
16 changed files with 60 additions and 36 deletions
+2 -2
View File
@@ -52,7 +52,7 @@
//if the public directory doesn't exist then create it
if ($domains_processed == 1) {
if (strlen($_SESSION['switch']['dialplan']['dir']) > 0) {
if (!is_dir($_SESSION['switch']['dialplan']['dir'].'/public')) { mkdir($_SESSION['switch']['dialplan']['dir'].'/public',02770,true); }
if (!is_dir($_SESSION['switch']['dialplan']['dir'].'/public')) { event_socket_mkdir($_SESSION['switch']['dialplan']['dir'].'/public'); }
}
}
@@ -61,7 +61,7 @@
//make sure the public directory and xml file exist
if (strlen($_SESSION['switch']['dialplan']['dir']) > 0) {
if (!is_dir($_SESSION['switch']['dialplan']['dir'].'/public'.$_SESSION['domains'][$domain_uuid]['domain_name'])) {
mkdir($_SESSION['switch']['dialplan']['dir'].'/public/'.$_SESSION['domains'][$domain_uuid]['domain_name'],02770,true);
event_socket_mkdir($_SESSION['switch']['dialplan']['dir'].'/public/'.$_SESSION['domains'][$domain_uuid]['domain_name']);
}
$file = $_SESSION['switch']['dialplan']['dir']."/public/".$_SESSION['domains'][$domain_uuid]['domain_name'].".xml";
if (!file_exists($file)) {