Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save rajucs/4bbe08feea579f4c0579c8083e256e95 to your computer and use it in GitHub Desktop.

Select an option

Save rajucs/4bbe08feea579f4c0579c8083e256e95 to your computer and use it in GitHub Desktop.
[2018-08-20 18:31:59] local.ERROR: ErrorException: file_put_contents(/var/www/html/project/storage/framework/sessions/c2sIrTFFxvDvMoeWaFIiMYK0dTu4X02l6pN7BOtT): failed to open stream: Permission denied in /var/www/html/unitwo-phase-1/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php:122
Stack trace:
#0 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(2, 'file_put_conten...', '/var/www/html/u...', 122, Array)
#1 /var/www/html/project/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php(122): file_put_contents('/var/www/html/u...', 'a:3:{s:6:"_toke...', 2)
#2 /var/www/html/project/vendor/laravel/framework/src/Illuminate/Session/FileSessionHandler.php(83): Illuminate\Filesystem\Filesystem->put('/var/www/html/u...', 'a:3:{s:6:"_toke...', true)
#3 /var/www/html/project/vendor/laravel/framework/src/Illuminate/Session/Store.php(128): Illuminate\Session\FileSessionHandler->write('c2sIrTFFxvDvMoe...', 'a:3:{s:6:"_toke...')
#4 /var/www/html/project/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(88): Illuminate\Session\Store->save()
#5 /var/www/html/project/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(218): Illuminate\Session\Middleware\StartSession->terminate(Object(Illuminate\Http\Request), Object(Illuminate\Http\Response))
#6 /var/www/html/project/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(189): Illuminate\Foundation\Http\Kernel->terminateMiddleware(Object(Illuminate\Http\Request), Object(Illuminate\Http\Response))
#7 /var/www/html/project/public/index.php(58): Illuminate\Foundation\Http\Kernel->terminate(Object(Illuminate\Http\Request), Object(Illuminate\Http\Response))
#8 {main}
To fix this problem need to directory writable
firstly go to project directory cd /var/www/html/project
secondly, chmod -R 755 storage
Thats it
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment