Photo by Romanos Senikidis on Unsplash
Laravel Sail - The stream or file "/var/www/html/storage/logs/laravel.log" could not be opened in append mode
Description:
When a root user in WSL Ubuntu runs the command "./vendor/bin/sail up", docker creates a container but the generated Laravel web page displays the following error message:
The stream or file "/var/www/html/storage/logs/laravel.log" could not be opened in append mode: Failed to open stream: Permission denied
Possible solution:
Run as a non-root user.
Reference:
https://medium.com/redbubble/running-a-docker-container-as-a-non-root-user-7d2e00f8ee15