Permissions not updating - Strange Symbolic links issue on Lightsail / WordPress

0

When I launch a new instance on Amazon Lightsail for a WordPress website, I move the core WordPress files into a new folder under /opt/bitnami/wordpress/ named domainname.com, and do so for a couple virtual hosts.

For some reason, the initial WordPress install has symbolic links for the wp-config file, and the wp-content files when I view the directory. This issue seems to prevent me from fixing permissions issues also. I usually update permissions with the following:

sudo chown -R bitnami:daemon /opt/bitnami/wordpress/domain.com sudo find /opt/bitnami/wordpress/domain.com -type d -exec chmod 775 {} ; sudo find /opt/bitnami/wordpress/domain.com -type f -exec chmod 664 {} ; sudo chmod 640 /opt/bitnami/wordpress/domain.com/wp-config.php

But this doesn't do anything on this initial WordPress install. Whenever I create additional virtual host directories for other websites, updating permissions works as expected, and I don't see these symbolic links.

This issue is preventing me from updating plugins in the WP admin.

Anyone with some info or help would be greatly appreciated on how to fix this problem. Thank you!

BJSaws
asked a year ago558 views
1 Answer
2
Accepted Answer

To resolve the issue with the symbolic links in the initial WordPress install, you can try breaking the symbolic links and replacing them with the actual files. This can be done by executing the following commands:

sudo rm /opt/bitnami/wordpress/domain.com/wp-config.php sudo cp /opt/bitnami/wordpress/wp-config.php /opt/bitnami/wordpress/domain.com/wp-config.php

sudo rm -rf /opt/bitnami/wordpress/domain.com/wp-content sudo cp -r /opt/bitnami/wordpress/wp-content /opt/bitnami/wordpress/domain.com/wp-content

Then, you can update the permissions with the commands you provided:

sudo chown -R bitnami:daemon /opt/bitnami/wordpress/domain.com sudo find /opt/bitnami/wordpress/domain.com -type d -exec chmod 775 {} ; sudo find /opt/bitnami/wordpress/domain.com -type f -exec chmod 664 {} ; sudo chmod 640 /opt/bitnami/wordpress/domain.com/wp-config.php

This should resolve the issue with the symbolic links and allow you to update plugins in the WP admin.

profile picture
answered a year ago
  • That worked, thanks!

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