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
asked 10 months ago279 views
1 Answer
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
EXPERT
answered 10 months ago
profile picture
EXPERT
reviewed 10 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions