bom dia, estou tendo esse problema de forma recorrente ao iniciar meu docker com ieducar, alguem saberia me informar uma maneira de resolver de forma definitiva? The stream or file “/var/www/ieducar/storage/logs/laravel.log” could not be opened in append mode: Failed to open stream: Permission denied The exception occurred while attempting to log: The stream or file “/var/www/ieducar/storage/logs/laravel.log” could not be opened in append mode: Failed to open stream: Permission denied The exception occurred while attempting to log: The stream or file “/var/www/ieducar/storage/logs/laravel.log” could not be opened in append mode: Failed to open stream: Permission denied The exception occurred while attempting to log: The stream or file “/var/www/ieducar/storage/logs/laravel.log” could not be opened in append mode:
Esse erro indica que o Laravel não tem permissão para gravar no arquivo de log
Ajuste as permissões da pasta storage
e bootstrap/cache
sudo chown -R www-data:www-data /var/www/ieducar/storage /var/www/ieducar/bootstrap/cache
sudo chmod -R 775 /var/www/ieducar/storage /var/www/ieducar/bootstrap/cache
Isso garante que o Nginx (através do usuário www-data
) possa ler e gravar nessas pastas
Reinicie o Nginx e o PHP-FPM:
sudo systemctl restart nginx
sudo systemctl restart php8.1-fpm
Substitua php8.1-fpm pelo nome do seu serviço PHP se estiver usando outra versão (como php8.0-fpm, php7.4-fpm, etc).
Tenta isso pra ve.