Permissions Issue - Unable to upload

Keywords: WordPress + NGINX + SSL - AWS - Technical issue - Permissions
bnsupport ID: 15185980-e8ee-c1b6-cb45-700366a20430
Description:
Not able to upload, update plugins, etc.

I ran the following commands as pointed out in Bitnami support docs and a few support tickets, but this didn’t help:

sudo chown -R bitnami:daemon /opt/bitnami/apps/wordpress/htdocs/
sudo find /opt/bitnami/apps/wordpress/htdocs/ -type d -exec chmod 755 {} \;
sudo find /opt/bitnami/apps/wordpress/htdocs/ -type f -exec chmod 644 {} \;
sudo chmod 640 /opt/bitnami/apps/wordpress/htdocs/wp-config.php 

Hello @george3,

Could you let us know the exact issue you are facing and how you reproduce it? Maybe a screenshot could help.

When does it start to happen? After any particular change?

Regards

plugin-install

Hi @george3,

Your uploads folder does not have the right permissions. There is a typo in your commands. Please try it:

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

You used sudo find /opt/bitnami/apps/wordpress/htdocs/ -type d -exec chmod 755 {} \; instead sudo find /opt/bitnami/apps/wordpress/htdocs/ -type d -exec chmod 775 {} \;

Regards

That did not work. I don’t understand, you wrote two completely identical commands and said one has a typo. I don’t think there’s a typo:

  1. sudo find /opt/bitnami/apps/wordpress/htdocs/ -type d -exec chmod 755 {} ;
  2. sudo find /opt/bitnami/apps/wordpress/htdocs/ -type d -exec chmod 775 {} ;

Strangely, after EC2 instance rebooted, it partially started to work. Now I’m able to upload media and install plugins.

But still unable to UPDATE plugins. Getting this error:

Update failed: The update cannot be installed because we will be unable to copy some files. This is usually due to inconsistent file permissions.

Hi @george3,

The difference is in the permissions number:

  • 755: Group does not have write permissions
  • 775: Group do not have write permissions

Note that daemon (the group) needs write permissions in those folders.

Regards

Still not able to update plugins:

Update failed: The update cannot be installed because we will be unable to copy some files. This is usually due to inconsistent file permissions.

Hi @george3,

Could you please share with us a new support tool code in order to check the latest permissions of your files?

Regards

Here’s the new support tool number:
8a97139d-98ad-42e5-8b1a-f9fe54248233

Hi @george3,

I can see folders’ permissions are correct (775), but files’ permissions should be 664 instead of 644. Please execute these commands:

sudo find /opt/bitnami/apps/wordpress/htdocs/ -type f -exec chmod 664 {} \;
sudo chmod 640 /opt/bitnami/apps/wordpress/htdocs/wp-config.php 

Our documentation explains them:
https://docs.bitnami.com/aws/apps/wordpress-pro/administration/understand-file-permissions/

Regards