0

laravel.log could not be opened: failed to open stream: Permission denied

I cant able to read laravel.log file. While restarting laravel it gives the belwo error,

PHP Fatal error:  Uncaught UnexpectedValueException: 
The stream or file " /var/www/laravel/storage/logs/laravel.log"  could not be opened: failed to open stream: Permission denied
Linux Laravel Denial of Service Attack Add a comment
andrew
asked Apr 28 2017

Answer

0

It must be the permission error. Check the ownership and permissions for laravel.log file.

Add a comment
jagannatharumugam
asked May 01 2017
edited Oct 05 2018
Post your Answer
0

sudo chown -R www-data:www-data /path/to/your/laravel/root/directory sudo usermod -a -G www-data ubuntu sudo find /path/to/your/laravel/root/directory -type f -exec chmod 644 {} \; sudo find /path/to/your/laravel/root/directory -type d -exec chmod 755 {} \;

sudo chgrp -R www-data storage bootstrap/cache sudo chmod -R ug+rwx storage bootstrap/cache

Add a comment
Lwandile Rozani
asked Sep 21 2017
edited Oct 05 2018
Post your Answer