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
posta un anno fa288 visualizzazioni
1 Risposta
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
ESPERTO
con risposta un anno fa
profile picture
ESPERTO
verificato un anno fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande