Lumen: failed to open stream: Permission denied in .../vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:107
15,358
It looks like Storage folder doesnt have permission to write log files so you can run
chmod -R o+w projectname/storage
chmod -R o+w projectname/bootstrap
if you are using nginx then you need to use nginx user permission like below
sudo chown -R nginx:root storage
sudo chown -R nginx:root bootstrap
Related videos on Youtube
Comments
-
IgorAlves almost 2 years
My OS is ubuntu 16.04 and I am running Lumen 5.5. When I try to run the app in the browser I get an error 500:
and I am getting that error in my /var/log/nginx:
2017/10/09 06:51:26 [error] 1063#1063: *132 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught UnexpectedValueException: The stream or file "/home/ila/vhosts/dref_api.com/storage/logs/lumen.log" could not be opened: failed to open stream: Permission denied in home/ila/vhosts/dref_api.com/ vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:107
Permissions in
vendor/ and all monolog/ sub files
are :So, I think could apply
sudo chmod -R guo+w /vendor
but I dont know if it would works or even if it is a good practice.How are you solving this issue?
-
IgorAlves over 6 yearsyes, it only worked after I apply 777 for storage.
-