Nothing works to give write permissions to a folder (LAMP Lightsail)

0

The error log that kicked off all this:

PHP message: PHP Fatal error:  Uncaught UnexpectedValueException: The stream or file "/opt/bitnami/apache/htdocs/storage/logs/lumen-2023-06-30.log" could not be opened in append mode: Failed to open stream: Permission denied\nThe exception occurred while attempting to log: The stream or file "/opt/bitnami/apache/htdocs/storage/logs/lumen-2023-06-30.log" could not be opened in append mode

Here is what I tried:

  1. sudo chmod +777 /opt/bitnami/apache/htdocs
  2. sudo chmod +rwx /opt/bitnami/apache/htdocs

It did not solve the problem though. What should I try?

Artem
feita há um ano288 visualizações
1 Resposta
0

Try the following command.
I think the error is probably that the file "/opt/bitnami/apache/htdocs/storage/logs/" is not authorized and cannot be opened or written to.

sudo chmod -R 775 /opt/bitnami/apache/htdocs/
sudo chown -R bitnami:root /opt/bitnami/apache/htdocs/
profile picture
ESPECIALISTA
respondido há um ano
profile picture
ESPECIALISTA
avaliado há um ano

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas