Ver código fonte

Poprawka do uprawnień tworzonych katalogów

Mariusz Muszyński 8 anos atrás
pai
commit
708ac980b8

+ 3 - 3
SE/se-lib/Route/UrlAction/BiAuditGenerate.php

@@ -1026,7 +1026,7 @@ Router::getRoute("UrlAction_BiAuditGenerate")->' . $function . ';
 			$reloadCacheLogFile = $tasksDirLocation . "/reloadCache.log";
 
 			### Utworzenie niezbędnych katalogów i plików
-			if (!file_exists($tasksDirLocation)) mkdir($tasksDirLocation, 0755, true);
+			if (!file_exists($tasksDirLocation)) mkdir($tasksDirLocation, 0770, true);
 			if (!file_exists($tasksDirLocation)) throw new Exception('Error during creating temporary directory.');
 
 
@@ -1154,7 +1154,7 @@ Router::getRoute("UrlAction_BiAuditGenerate")->' . $function . ';
 					$generatePowiazaniaResult = json_decode(file_get_contents($generatePowiazaniaResultFile), true);
 					if ($generatePowiazaniaResult['result'] == "ok") {
 						$powiazanieDirLocation = self::getDirectory('BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA', $row['ID']);
-						if (!file_exists($powiazanieDirLocation)) mkdir($powiazanieDirLocation, 0777, false);
+						if (!file_exists($powiazanieDirLocation)) mkdir($powiazanieDirLocation, 0770, false);
 						if (!file_exists($powiazanieDirLocation)) $error = "Nie udało się wgrać pliku xml - nie można utworzyć katalogu dla rekordu";
 						else $success = true;
 					} else $error = "Wystąpił błąd podczas generowania powiązań ({$generatePowiazaniaResult['message']})";
@@ -2649,7 +2649,7 @@ class BiAuditPowiazania {
 		$antXmlFile = $antDir . "/" . $antXmlFilename;
 		$pdfFile = "/Library/Server/Web/Data/Sites/Default/SE/schema/WPS_Functions/default_db/CRM_PROCES_tree/temp/relations-{$id_part}/pdf/relations-{$id_part}.pdf";
 		$htmlDir = "/Library/Server/Web/Data/Sites/Default/SE/schema/WPS_Functions/default_db/CRM_PROCES_tree/temp/relations-{$id_part}/html";
-		if (!file_exists($antDir)) mkdir($antDir, 0755, true);
+		if (!file_exists($antDir)) mkdir($antDir, 0770, true);
 		if (!is_dir($antDir)) {
 			$sqlArr['FILE_STATUS_info'] .= ", ale nie udało się utworzyć plików PDF i HTML";
 			self::saveToLog("Nie wygenerowano plików PDF oraz HTML - problem z utworzeniem katalogu dla ant ({$resultsPart})");

+ 1 - 1
SE/se-lib/Route/UrlAction/WmsGenerate.php

@@ -322,7 +322,7 @@ openOnFocus: false
 
 			### Utworzenie niezbędnych katalogów i plików
 			$wmsDirLocation=$this->getMainDirectory();
-			if (!file_exists($wmsDirLocation.'/.maps/.single')) mkdir($wmsDirLocation.'/.maps/.single',0755,true);
+			if (!file_exists($wmsDirLocation.'/.maps/.single')) mkdir($wmsDirLocation.'/.maps/.single',0770,true);
 			if (!file_exists($wmsDirLocation.'/.maps/.single')) throw new Exception('Error during creating maps directory.');
 			if (!file_exists($wmsDirLocation.'/.maps/.template.html')) file_put_contents($wmsDirLocation.'/.maps/.template.html','');