Skip to content

Commit

Permalink
Use absolute paths for permissions check #693
Browse files Browse the repository at this point in the history
  • Loading branch information
nabeelio committed May 15, 2020
1 parent 78ee1a9 commit 77d7ffb
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 15 deletions.
22 changes: 11 additions & 11 deletions modules/Installer/Config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,16 @@

// 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'),
],
];
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
@section('title', 'Install phpVMS')

@section('content')
<h2>phpvms installer</h2>
<p>Press continue to start</p>
{{ Form::open(['route' => 'installer.step1', 'method' => 'post']) }}
<p style="text-align: right">
Expand Down
5 changes: 2 additions & 3 deletions modules/Installer/Services/RequirementsService.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,8 @@ public function checkPermissions(): array
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;
Expand All @@ -68,7 +67,7 @@ public function checkPermissions(): array
}

$directories[] = [
'dir' => $dir,
'dir' => $path,
'passed' => $pass,
];
}
Expand Down

0 comments on commit 77d7ffb

Please sign in to comment.