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

@@ -99,7 +99,7 @@ include "root.php";
//make sure the conf directory exists
if (!is_dir($this->global_settings->switch_conf_dir())) {
if (!mkdir($this->global_settings->switch_conf_dir(), 0774, true)) {
if (!mkdir($this->global_settings->switch_conf_dir(), 2774, true)) {
throw new Exception("Failed to create the switch conf directory '".$this->global_settings->switch_conf_dir()."'. ");
}
}
@@ -117,9 +117,9 @@ include "root.php";
unset($src_dir, $dst_dir);
}
$fax_dir = join( DIRECTORY_SEPARATOR, array($this->global_settings->switch_storage_dir(), 'fax'));
if (!is_readable($fax_dir)) { mkdir($fax_dir,0777,true); }
if (!is_readable($fax_dir)) { mkdir($fax_dir,2777,true); }
$voicemail_dir = join( DIRECTORY_SEPARATOR, array($this->global_settings->switch_storage_dir(), 'voicemail'));
if (!is_readable($voicemail_dir)) { mkdir($voicemail_dir,0777,true); }
if (!is_readable($voicemail_dir)) { mkdir($voicemail_dir,2777,true); }
//write the xml_cdr.conf.xml file
if (file_exists($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/app/xml_cdr")) {