Salta al contenuto

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!

posta 3 anni fa798 visualizzazioni
1 Risposta
2
Risposta accettata

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.

con risposta 3 anni fa
  • That worked, thanks!

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.