Passer au contenu

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!

demandé il y a 3 ans800 vues
1 réponse
2
Réponse acceptée

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.

répondu il y a 3 ans
  • That worked, thanks!

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.