Add read permission check for .env

This commit is contained in:
printempw 2018-07-22 12:09:18 +08:00
parent 1597f0fac0
commit 55c7109b98
3 changed files with 6 additions and 0 deletions

View File

@ -37,6 +37,10 @@ class RuntimeCheckServiceProvider extends ServiceProvider
throw new PrettyPageException(trans('setup.file.no-dot-env'), -1);
}
if (! is_readable(app()->environmentFile())) {
throw new PrettyPageException(trans('setup.file.dot-env-no-read-permission'), -1);
}
// Check permissions of storage path
if (! is_writable(storage_path())) {
throw new PrettyPageException(trans('setup.permissions.storage'), -1);

View File

@ -6,6 +6,7 @@ database:
file:
permission-error: Unable to create textures folder, please check the directory permissions or place one manually.
no-dot-env: Unable to find environment configuration file. Please rename .env.example to .env (please refer to setup manual).
dot-env-no-read-permission: Unable to read .env configuration file. Please check the file permission.
permissions:
storage: Unable to write to storage directory, please check the permissions.

View File

@ -6,6 +6,7 @@ database:
file:
permission-error: textures 文件夹创建失败,请确认目录权限是否正确,或者手动放置一个。
no-dot-env: 找不到配置文件,请将 .env.example 重命名至 .env 并仔细阅读安装指南。
dot-env-no-read-permission: 无法读取 .env 配置文件,请检查文件权限。
permissions:
storage: 无法写入 storage 目录,请检查目录权限是否正确