How to Solve Error: the stream or file “/var/www/html/storage/logs/laravel.log” could not be opened in append mode: failed to open stream: permission denied

If you encountered an error that says “Could Not Be Opened In Append Mode: Failed To Open Stream: Permission Denied” such us the the image below, you can solve this by simply changing the permission access of certain file.

Change the access permission of the docker.sock file (docker socket) to be able to connect to the docker daemon by typing the following command:

$ sudo chmod 666 /var/run/docker.sock

The chmod 666 will allow all users to read and write but cannot execute the file.

Leave a Comment

Your email address will not be published. Required fields are marked *