add permission check for storage path
This commit is contained in:
parent
c37091d0f1
commit
5e567c48a5
|
|
@ -28,6 +28,11 @@ class BootServiceProvider extends ServiceProvider
|
|||
throw new PrettyPageException(trans('setup.file.no-dot-env'), -1);
|
||||
}
|
||||
|
||||
// check permissions of storage path
|
||||
if (!is_writable(storage_path())) {
|
||||
throw new PrettyPageException(trans('setup.permissions.storage'), -1);
|
||||
}
|
||||
|
||||
try {
|
||||
// check database config
|
||||
Database::prepareConnection();
|
||||
|
|
|
|||
9
resources/lang/en/setup.yml
Normal file
9
resources/lang/en/setup.yml
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
database:
|
||||
connection-error: Unable to connect to MySQL server, please check your configuration. :msg
|
||||
|
||||
file:
|
||||
permission-error: Unable to create textures folder, please check the directory permissions or place one manually.
|
||||
no-dot-env: Unable to find the .env configuration file.
|
||||
|
||||
permissions:
|
||||
storage: Unable to write to storage directory, please check the permissions.
|
||||
|
|
@ -4,3 +4,6 @@ database:
|
|||
file:
|
||||
permission-error: textures 文件夹创建失败,请确认目录权限是否正确,或者手动放置一个。
|
||||
no-dot-env: 找不到 .env 配置文件
|
||||
|
||||
permissions:
|
||||
storage: 无法写入 storage 目录,请检查目录权限是否正确
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user