From 876457af71996a097986da65802b8f0949e5133f Mon Sep 17 00:00:00 2001 From: Nabeel Shahzad Date: Fri, 15 May 2020 15:42:57 -0400 Subject: [PATCH] Use absolute paths for permissions check #693 --- modules/Installer/Config/config.php | 22 +++++++++---------- .../views/install/index-start.blade.php | 1 - .../Services/RequirementsService.php | 5 ++--- 3 files changed, 13 insertions(+), 15 deletions(-) diff --git a/modules/Installer/Config/config.php b/modules/Installer/Config/config.php index f18f27f5..f3664228 100644 --- a/modules/Installer/Config/config.php +++ b/modules/Installer/Config/config.php @@ -26,16 +26,16 @@ return [ // Make sure these are writable 'permissions' => [ - 'bootstrap/cache', - 'public/uploads', - 'storage', - 'storage/app/public', - 'storage/app/public/avatars', - 'storage/app/public/uploads', - 'storage/framework', - 'storage/framework/cache', - 'storage/framework/sessions', - 'storage/framework/views', - 'storage/logs', + base_path('bootstrap/cache'), + public_path('uploads'), + storage_path(), + storage_path('app/public'), + storage_path('app/public/avatars'), + storage_path('app/public/uploads'), + storage_path('framework'), + storage_path('framework/cache'), + storage_path('framework/sessions'), + storage_path('framework/views'), + storage_path('logs'), ], ]; diff --git a/modules/Installer/Resources/views/install/index-start.blade.php b/modules/Installer/Resources/views/install/index-start.blade.php index 45cd81b2..62d69839 100644 --- a/modules/Installer/Resources/views/install/index-start.blade.php +++ b/modules/Installer/Resources/views/install/index-start.blade.php @@ -2,7 +2,6 @@ @section('title', 'Install phpVMS') @section('content') -

phpvms installer

Press continue to start

{{ Form::open(['route' => 'installer.step1', 'method' => 'post']) }}

diff --git a/modules/Installer/Services/RequirementsService.php b/modules/Installer/Services/RequirementsService.php index 00eb8f15..140614f4 100644 --- a/modules/Installer/Services/RequirementsService.php +++ b/modules/Installer/Services/RequirementsService.php @@ -55,9 +55,8 @@ class RequirementsService extends Service clearstatcache(); $directories = []; - foreach (config('installer.permissions') as $dir) { + foreach (config('installer.permissions') as $path) { $pass = true; - $path = base_path($dir); if (!file_exists($path)) { $pass = false; @@ -68,7 +67,7 @@ class RequirementsService extends Service } $directories[] = [ - 'dir' => $dir, + 'dir' => $path, 'passed' => $pass, ]; }