The stream or file “laravel.log” could not be opened in append mode

Asked by: chris11
Date:
Viewed: 603
Answers: 1
  • 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

Answer by: ChristianKovats

Answered on: 25 Jan 2023 Marked as best by question author

  • 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.

Please log in to post an answer!