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

Question

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

Answer ( 1 )

    0
    2023-01-25T11:25:37+00:00
    This answer was edited.

    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.

Leave an answer