创建目录权限修改为0644

This commit is contained in:
thinkphp
2016-07-12 13:42:50 +08:00
parent fbe7eef11e
commit 7281e76aff
4 changed files with 8 additions and 8 deletions

View File

@@ -57,7 +57,7 @@ class Build
foreach ($list as $dir) { foreach ($list as $dir) {
if (!is_dir(APP_PATH . $dir)) { if (!is_dir(APP_PATH . $dir)) {
// 创建目录 // 创建目录
mkdir(APP_PATH . $dir, 0777, true); mkdir(APP_PATH . $dir, 0644, true);
} }
} }
} }
@@ -73,7 +73,7 @@ class Build
foreach ($list as $file) { foreach ($list as $file) {
if (!is_dir(APP_PATH . dirname($file))) { if (!is_dir(APP_PATH . dirname($file))) {
// 创建目录 // 创建目录
mkdir(APP_PATH . dirname($file), 0777, true); mkdir(APP_PATH . dirname($file), 0644, true);
} }
if (!is_file(APP_PATH . $file)) { if (!is_file(APP_PATH . $file)) {
file_put_contents(APP_PATH . $file, 'php' == pathinfo($file, PATHINFO_EXTENSION) ? "<?php\n" : ''); file_put_contents(APP_PATH . $file, 'php' == pathinfo($file, PATHINFO_EXTENSION) ? "<?php\n" : '');
@@ -118,7 +118,7 @@ class Build
foreach ($file as $dir) { foreach ($file as $dir) {
if (!is_dir($modulePath . $dir)) { if (!is_dir($modulePath . $dir)) {
// 创建目录 // 创建目录
mkdir($modulePath . $dir, 0777, true); mkdir($modulePath . $dir, 0644, true);
} }
} }
} elseif ('__file__' == $path) { } elseif ('__file__' == $path) {
@@ -146,7 +146,7 @@ class Build
$filename = $modulePath . $path . DS . $val . '.html'; $filename = $modulePath . $path . DS . $val . '.html';
if (!is_dir(dirname($filename))) { if (!is_dir(dirname($filename))) {
// 创建目录 // 创建目录
mkdir(dirname($filename), 0777, true); mkdir(dirname($filename), 0644, true);
} }
$content = ''; $content = '';
break; break;
@@ -178,7 +178,7 @@ class Build
$content = file_get_contents(THINK_PATH . 'tpl' . DS . 'default_index.tpl'); $content = file_get_contents(THINK_PATH . 'tpl' . DS . 'default_index.tpl');
$content = str_replace(['{$app}', '{$module}', '{layer}', '{$suffix}'], [$namespace, $module ? $module . '\\' : '', 'controller', $suffix ? 'Controller' : ''], $content); $content = str_replace(['{$app}', '{$module}', '{layer}', '{$suffix}'], [$namespace, $module ? $module . '\\' : '', 'controller', $suffix ? 'Controller' : ''], $content);
if (!is_dir(dirname($filename))) { if (!is_dir(dirname($filename))) {
mkdir(dirname($filename), 0777, true); mkdir(dirname($filename), 0644, true);
} }
file_put_contents($filename, $content); file_put_contents($filename, $content);
} }

View File

@@ -79,7 +79,7 @@ class File extends SplFileObject
return true; return true;
} }
if (mkdir($path, 0777, true)) { if (mkdir($path, 0644, true)) {
return true; return true;
} else { } else {
$this->error = "目录 {$path} 创建失败!"; $this->error = "目录 {$path} 创建失败!";

View File

@@ -25,7 +25,7 @@ class Make extends Command
} }
if (!is_dir(dirname($file))) { if (!is_dir(dirname($file))) {
mkdir(strtolower(dirname($file)), 0777, true); mkdir(strtolower(dirname($file)), 0644, true);
} }
file_put_contents($file, $content); file_put_contents($file, $content);

View File

@@ -26,7 +26,7 @@ class File
// 检测模板目录 // 检测模板目录
$dir = dirname($cacheFile); $dir = dirname($cacheFile);
if (!is_dir($dir)) { if (!is_dir($dir)) {
mkdir($dir, 0777, true); mkdir($dir, 0644, true);
} }
// 生成模板缓存文件 // 生成模板缓存文件
if (false === file_put_contents($cacheFile, $content)) { if (false === file_put_contents($cacheFile, $content)) {