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

@@ -399,7 +399,7 @@ if (!class_exists('xml_cdr')) {
catch(PDOException $e) {
$tmp_dir = $_SESSION['switch']['log']['dir'].'/xml_cdr/failed/';
if(!file_exists($tmp_dir)) {
mkdir($tmp_dir, 02770, true);
event_socket_mkdir($tmp_dir);
}
if ($_SESSION['cdr']['format']['text'] == "xml") {
$tmp_file = $uuid.'.xml';
@@ -426,7 +426,7 @@ if (!class_exists('xml_cdr')) {
$tmp_day = date("d", $tmp_time);
$tmp_dir = $_SESSION['switch']['log']['dir'].'/xml_cdr/archive/'.$tmp_year.'/'.$tmp_month.'/'.$tmp_day;
if(!file_exists($tmp_dir)) {
mkdir($tmp_dir, 02770, true);
event_socket_mkdir($tmp_dir);
}
if ($_SESSION['cdr']['format']['text'] == "xml") {
$tmp_file = $uuid.'.xml';