내용으로 건너뛰기

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!

질문됨 3년 전800회 조회
1개 답변
2
수락된 답변

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.

답변함 3년 전
  • That worked, thanks!

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

관련 콘텐츠