Keywords: WordPress - AWS - Technical issue - Permissions
WordPress updates keeps complaining about not having write access. I did not use the WP app, instead my WP is installed at /opt/bitnami/apache2/htdocs/ using the AWS Lightsail LAMP stack.
All files in /htdocs belong to daemon group and are owned by Bitnami. Yet Apache/PHP cannot write files. If I change the ownership to daemon with chown -R daemon:daemon then of course Apache/PHP can write (and my WordPress updates work), but then aside from it not being secure my SSH user bitnami has no write access. It seems like my options are either files owned by Bitnami, and therefore WP/PHP/Apache cannot control them, or files owned by daemon and then SSH doesn't work. How to give write access to BOTH daemon and bitnami?? I've tried a series of commands that was supposed to do this, such as:
sudo chown -R bitnami:daemon /opt/bitnami/apache2/htdocs
sudo chmod -R g+w /opt/bitnami/apache2/htdocs
sudo chmod 644 /opt/bitnami/apache2/htdocs/wp-config.php
After running those commands, over Winscp SSH the files look right, everything belongs to daemon group and is owned by Bitnami, SSH has write access... WordPress updates still don't work, Apache is still denied access.