misc: 관리를 위해 mkdir에 group permission 부여

This commit is contained in:
2022-11-05 15:17:57 +09:00
parent 054a6c7073
commit cfdae1ddfa
4 changed files with 12 additions and 12 deletions
+4 -4
View File
@@ -90,19 +90,19 @@ if (
//기본 파일 생성 //기본 파일 생성
if (!file_exists(AppConf::getUserIconPathFS())) { if (!file_exists(AppConf::getUserIconPathFS())) {
mkdir(AppConf::getUserIconPathFS()); mkdir(AppConf::getUserIconPathFS(), 0775);
} }
if (!file_exists(ROOT . '/d_log')) { if (!file_exists(ROOT . '/d_log')) {
mkdir(ROOT . '/d_log'); mkdir(ROOT . '/d_log', 0775);
} }
if (!file_exists(ROOT . '/d_setting')) { if (!file_exists(ROOT . '/d_setting')) {
mkdir(ROOT . '/d_setting'); mkdir(ROOT . '/d_setting', 0775);
} }
if (!file_exists(ROOT . '/d_shared')) { if (!file_exists(ROOT . '/d_shared')) {
mkdir(ROOT . '/d_shared'); mkdir(ROOT . '/d_shared', 0775);
} }
} }
+2 -2
View File
@@ -63,8 +63,8 @@ function prepareDir(string $dirPath, bool $forceCreate=true):bool{
if(!unlink($dirPath)){ if(!unlink($dirPath)){
return false; return false;
} }
return mkdir($dirPath); return mkdir($dirPath, 0775);
} }
return mkdir($dirPath, 0777, true); return mkdir($dirPath, 0775, true);
} }
+5 -5
View File
@@ -18,8 +18,8 @@ class ResetHelper{
'reason'=>'logs, data 디렉토리를 생성할 권한이 없습니다.' 'reason'=>'logs, data 디렉토리를 생성할 권한이 없습니다.'
]; ];
} }
mkdir($servRoot.'/logs', 0755); mkdir($servRoot.'/logs', 0775);
mkdir($servRoot.'/data', 0755); mkdir($servRoot.'/data', 0775);
} }
if(!is_writable($servRoot.'/logs')){ if(!is_writable($servRoot.'/logs')){
@@ -44,7 +44,7 @@ class ResetHelper{
} }
if(!file_exists($servRoot.'/logs/preserved')){ if(!file_exists($servRoot.'/logs/preserved')){
mkdir($servRoot.'/logs/preserved', 0755); mkdir($servRoot.'/logs/preserved', 0775);
} }
if(!file_exists($servRoot.'/logs/.htaccess')){ if(!file_exists($servRoot.'/logs/.htaccess')){
@@ -80,8 +80,8 @@ class ResetHelper{
$serverID = DB::prefix().'_'.date("ymd").'_'.Util::randomStr(4); $serverID = DB::prefix().'_'.date("ymd").'_'.Util::randomStr(4);
mkdir($servRoot.'/logs/'.$serverID, 0755); mkdir($servRoot.'/logs/'.$serverID, 0775);
mkdir($servRoot.'/data/'.$serverID, 0755); mkdir($servRoot.'/data/'.$serverID, 0775);
$seasonIdx = 1; $seasonIdx = 1;
if($db->queryFirstField('SHOW TABLES LIKE %s', 'storage') !== null){ if($db->queryFirstField('SHOW TABLES LIKE %s', 'storage') !== null){
+1 -1
View File
@@ -267,7 +267,7 @@ if (!file_exists($server)) {
'reason' => $server . ' 디렉토리가 없지만 생성할 권한이 없습니다.' 'reason' => $server . ' 디렉토리가 없지만 생성할 권한이 없습니다.'
]); ]);
} }
mkdir($server, 0755); mkdir($server, 0775);
} }