The stream or file “laravel.log” could not be opened in append mode
- 0
Hi,
I’m on a Mac and in localhost using XAMPP I’m getting this permission error:
The stream or file “/Applications/XAMPP/xamppfiles/htdocs/newsapp/storage/logs/laravel.log” could not be opened in append mode: Failed to open stream: Permission denied The exception occurred while attempting to log
How can I fix this?
Thanks
Answers
- 1
As you said it’s a permission error. Navigate to the main Laravel installation. In terminal type the following command:
sudo chmod -R ugo+rw storage
or
sudo chmod -R 777 storage
You may encounter other similar errors for other folders. Just do the same.