FIle could not be opened in append mode: failed to open stream: Permission denied laradock

Pawan Rai picture Pawan Rai · Aug 1, 2020 · Viewed 42.8k times · Source

I'm setting up laradock (Setup for Multiple Projects) following the official documentation from the Laradock in my local machine.

After installation I installed the laravel through workspace container bash. I did configured the config file for the app in nginx/sites/ directory and in /etc/hosts file.

While visiting the development url I'm getting the following error message:

The stream or file "/var/www/laravel-api/storage/logs/laravel.log" could not be opened in append mode: failed to open stream: Permission denied

Answer

MARIO MORENO picture MARIO MORENO · Feb 6, 2021

This worked for me:

chown -R www-data:www-data "project foldername"