1

I would really appreciate any help on this, i have installed Laravel Valet on Mac but when i have ran php artisan serve, and gone to the web to access my new project (I have not even started coding yet) I am getting the following error:

UnexpectedValueException The stream or file "/Users/kerrymckinney/Desktop/website/storage/logs/laravel.log" could not be opened: failed to open stream: Permission denied

enter image description here

Thanks in advance.

  • 1
    Check that the user running Laravel has permissions to write to the logs directory: https://support.apple.com/en-gb/guide/mac-help/mchlp1203/mac – CountKyle Mar 03 '20 at 18:27
  • 2
    What's the permission on the file? what user is running the file? Read about chmod and the correct settings you need to run laravel in your laptop – Dvid Silva Mar 03 '20 at 18:28
  • @DvidSilva the admin user is trying to run the file –  Mar 03 '20 at 18:40
  • @CountKyle thanks for this, I added my user and admin to give custom access "read & write" however i am still getting the same error. It appears to have made no difference. I added an image hoping this can help. Thanks –  Mar 03 '20 at 18:45
  • @zakka As mentioned by Dvid Silva, I'd have a look at permissions and chmod. This is a permissions issue. There is a similar question regarding laravel directory permissions here: https://stackoverflow.com/questions/30639174/how-to-set-up-file-permissions-for-laravel – CountKyle Mar 03 '20 at 18:52
  • @CountKyle via your link fixed using the following command "wget -qO- https://raw.githubusercontent.com/defaye/bootstrap-laravel/master/bootstrap.sh | sh" –  Mar 03 '20 at 19:03

0 Answers0