0

Error in exception handler:

The stream or file "/home/wwwroot/default/tor_service/app/storage/logs/laravel.log" could not be opened: failed to open stream: Permission denied in /home/wwwroot/default/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:84

Anyone knows how to fix this? Thank you.

Peyman Mohamadpour
  • 17,954
  • 24
  • 89
  • 100
ByLug
  • 11
  • 1
  • 2
  • This says that you do not have the permission to write to the file `/home/wwwroot/default/tor_service/app/storage/logs/laravel.log`, make sure that you can create a file and edit its content in the above path. – Hieu Le Oct 09 '15 at 08:50
  • Can you explain a little more in detail please? – ByLug Oct 09 '15 at 09:02
  • You should exec the `touch /home/wwwroot/default/tor_service/app/storage/logs/laravel.log` in your console under the user that your web server is running to see if there is any errors. – Hieu Le Oct 09 '15 at 09:24

1 Answers1

-2

Storage folder should be writable by your web server.

You can change the owner of the storage directory to www-data

chown -R www-data:www-data storage
chanafdo
  • 5,016
  • 3
  • 29
  • 46
  • 4
    **Warning:** Before deciding to defeat the security provided by having file permissions differentiated by user and operational requirements, think carefully about the risk you're taking. See [_Why shouldn't /var/www have chmod 777?_](http://askubuntu.com/questions/20105) – Mogsdad Jun 03 '16 at 20:30