I have Ubuntu and Laravel 5 framework and I see the white screen in the browser.
When I change storage/logs
directory permissions it helps, but I have to do it every day, due the 'daily' log configuration.
Change all file permissions to 644. Change all folder permissions to 755. For storage and bootstrap cache (special folders used by laravel for creating and executing files, not available from outside) set permission to 777, for anything inside.
By default, Laravel is configured to create a single log file for your application, and this file is stored in app/storage/logs/laravel. log .
Log" Could Not Be Opened In Append Mode: Failed To Open Stream: Permission Denied problem can be solved using the computer language. Another approach, which includes several samples of code, can be utilised to resolve the identical problem The Stream Or File /Storage/Logs/Laravel.
The permissions for the storage
and vendor
folders should stay at 775
, for obvious security reasons.
However, both your computer and your server Apache need to be able to write in these folders. Ex: when you run commands like php artisan
, your computer needs to write in the logs file in storage
.
All you need to do is to give ownership of the folders to Apache :
sudo chown www-data:www-data /path/to/your/project/vendor
sudo chown www-data:www-data /path/to/your/project/storage
Then you need to add your computer (referenced by it's username
) to the group to which the server Apache belongs. Like so :
sudo usermod -a -G www-data userName
Most frequently, groupName
is www-data
but you might want to replace it with your correct group.
I got the same error. By using the following command I could solve it. For some reason, it is not about the log file.
sudo chgrp -R www-data storage bootstrap/cache
sudo chmod -R ug+rwx storage bootstrap/cache
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With