I'm running Laravel app on server (Ubuntu 16.04). I have an error
The stream or file "/var/www/mydomain.com/storage/logs/laravel.log" could not be opened: failed to open stream: Permission denied
I've already google my question. I found this answer, but it wasn't helpful. I can't set 777 permission for storage (it's dangerous), as was suggested by many other answers I found.
Any other suggestions?
UPDATE:
sudo chgrp -R www-data storage bootstrap/cache
sudo chmod -R ug+rwx storage bootstrap/cache
was helpful
root:www 700
set for the logs directory (setting it for just the .log file may not be sufficient) – Dunlap770
above; the group write permissions are required too. Please include at least the output ofls
against the logs directory in your question to show its permissions and ownership. – Dunlap