My wp-content folder and wp-config.php are stuck on permission 777

Keywords: WordPress - AWS - Technical issue - Permissions

bnsupport ID: ea3e7cad-72c1-7c1f-23b3-579ed11557a2

bndiagnostic output:

? Apache: Found possible issues
? Wordpress: Found possible issues
? Resources: Found possible issues
https://docs.bitnami.com/general/apps/wordpress/troubleshooting/debug-errors-apache/
https://docs.bitnami.com/installer/faq/linux-faq/administration/increase-memory-linux/

bndiagnostic failure reason: The suggested guides are not related with my issue

Description:
I have no idea how the permission got changed for them. I have tried everything in the forums to change the permissions back to the original settings as per forum topics with no success, such as:

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

ls -la /opt/bitnami/wordpress/wp-content/

Result:

total 56
drwxrwxr-x 10 bitnami daemon 4096 Nov 17 09:40 .
drwxrwxr-x 3 bitnami daemon 4096 Nov 8 21:58 …
-rw-rw-r-- 1 bitnami daemon 1188 Nov 16 10:14 advanced-cache.php
drwxrwxr-x 6 bitnami daemon 4096 Nov 17 09:57 cache
-rw-rw-r-- 1 bitnami daemon 28 Nov 8 21:59 index.php
drwxrwxr-x 4 bitnami daemon 4096 Nov 9 09:59 languages
drwxrwxr-x 2 bitnami daemon 4096 Nov 13 08:44 mu-plugins
-rw-rw-r-- 1 bitnami daemon 4517 Nov 17 09:40 object-cache.php
drwxrwxr-x 36 bitnami daemon 4096 Nov 21 23:45 plugins
drwxrwxr-x 4 bitnami daemon 4096 Nov 17 21:59 themes
drwxrwxr-x 2 bitnami daemon 4096 Nov 21 23:45 upgrade
drwxrwxr-x 12 bitnami daemon 4096 Nov 13 00:54 uploads
drwxrwxr-x 2 bitnami daemon 4096 Nov 17 09:57 w3tc-config

Hi @hknuk,

Could you try this?

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

I hope it helps

Thank you for your reply.

The permissions in the wp-content folder /opt/bitnami still won’t change after doing the above, stuck on 777, same with wp-config.php.

The folder /bitmani with the same files is set with the correct permissions.

Could you please run the support tool again to check the latest status of your files?

Regards

Tried running the support tool and received this error:

Error: There has been an error.
Unknown error while running /tmp/namiList.sh

Rebooted the instance and managed to run the tool, code as follows:

1a87cdaa-3c48-a8ee-abb3-6dc3ec0de2b4

Thank you

Hi @hknuk,

Please note that /opt/bitnami/wordpress/wp-config.php i s symbolic link to /bitnami/wordpress/wp-config.php.

$ ls -larth /opt/bitnami/wordpress/wp-config.php
lrwxrwxrwx 1 root root 32 Nov 26 09:39 /opt/bitnami/wordpress/wp-config.php -> /bitnami/wordpress/wp-config.php

This explains why it is not working, chmod does not apply any modification to symlink files

I can see you have the right permissions for this file.

Regards

Thank you David for your help. This makes sense.