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 0354e137ea
commit 6f2601e32a
16 changed files with 60 additions and 36 deletions

View File

@@ -27,7 +27,7 @@
//if the extensions dir doesn't exist then create it
if ($domains_processed == 1) {
if (strlen($_SESSION['switch']['extensions']['dir']) > 0) {
if (!is_dir($_SESSION['switch']['extensions']['dir'])) { mkdir($_SESSION['switch']['extensions']['dir'],02770,true); }
if (!is_dir($_SESSION['switch']['extensions']['dir'])) { event_socket_mkdir($_SESSION['switch']['extensions']['dir']); }
}
}

View File

@@ -397,7 +397,7 @@ if (!class_exists('extension')) {
$xml .= " </user>\n";
if (!is_readable($_SESSION['switch']['extensions']['dir']."/".$row['user_context'])) {
mkdir($_SESSION['switch']['extensions']['dir']."/".$row['user_context'],02770,true);
event_socket_mkdir($_SESSION['switch']['extensions']['dir']."/".$row['user_context']);
}
if (strlen($extension) > 0) {
$fout = fopen($_SESSION['switch']['extensions']['dir']."/".$row['user_context']."/v_".$extension.".xml","w");