# Problema com permissão de arquivos

**URL:** <https://forum.ieducar.org/t/problema-com-permissao-de-arquivos/2708>\
**Category:** Tecnologia\
**Created:** [Abril 3, 2025, 11:41am UTC](https://forum.ieducar.org/t/problema-com-permissao-de-arquivos/2708 "2025-04-03T11:41:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![yurisawaki](https://avatars.discourse-cdn.com/v4/letter/y/a698b9/32.png) [@yurisawaki](https://forum.ieducar.org/u/yurisawaki)\
**Post date:** [Abril 3, 2025, 11:41am UTC](https://forum.ieducar.org/t/problema-com-permissao-de-arquivos/2708/1 "2025-04-03T11:41:36Z")

</div>

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:

---

<div class="post-metadata">

**Author:** ![semed-AL](https://avatars.discourse-cdn.com/v4/letter/s/f04885/32.png) [@semed-AL](https://forum.ieducar.org/u/semed-AL)\
**Post date:** [Maio 8, 2025, 6:27pm UTC](https://forum.ieducar.org/t/problema-com-permissao-de-arquivos/2708/2 "2025-05-08T18:27:06Z")

</div>

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.
