AWS Wordpress User Permissions Issue

Hi all,

I’m running on ubuntu through the AWS platform. It’s taken me awhile to get a handle on all of the user/file permissions. At the moment i’m not as concerned with security as I am with just being able to have our designers create a site through the wordpress UI.

So i’ve set it up so that all files in htdocs are bitnami:daemon and all of the files inside of wp-content are set to 755.

I’m doing this by running these commands:

sudo chown -R bitnami:daemon /opt/bitnami/apps/wordpress/htdocs
sudo chmod -R 775 /opt/bitnami/apps/wordpress/htdocs/wp-content

Somehow though I keep running into issues where wordpress isn’t able to update or download something. One theme (Wolverine) isn’t able to save theme settings, and another theme (Avada) isn’t able to apply patches…

I’m also getting SFTP errors when I transfer all of the files:

Command:	put "C:\Users\Mark's PC\Downloads\themeforest-12789221-wolverine-responsive-multipurpose-theme (2)\wolverine-v2.2\wolverine\theme-plugins\wolverine-framework\wolverine-framework\includes\shortcodes\portfolio\assets\js\ladda\dist\ladda-themeless.min.css" "ladda-themeless.min.css"
Error:	File transfer failed

So I feel like there’s something fundamentally wrong with how I have everything setup… Any ideas?

Thanks,
Mark

Hey, @mark6,

You can try these commands and tell if it helps:

sudo chown -R bitnami:daemon /opt/bitnami/apps/wordpress/htdocs/
sudo chmod -R g+w /opt/bitnami/apps/wordpress/htdocs/

Hello @mark6

Did the solution proposed by @bulgaru help you to solve your issue?

Best Regards,

Juan Ariza

2017- New WP Install on EC2 Instance. Cannot Auto-Update anything from the WP Admin, only via FTP. Permissions have been changed to -d 755 / -f 644 for each directory/file from opt > bitnami > apps > wordpress > htdocs, but still cannot auto-update Wordpress Core, Translations, any Plugins or Themes.

The above commands had Zero effect.

Please advise if you’re around.

Thanks,
-scott

Hello @sleeilg

You changed the permissions to 755/644. Therefore the owner user with “writing” privileges is the owner (which is the user bitnami). WordPress is being offered through Apache which is run by user daemon, therefore, in order to deploy actions like the one you mentioned that requires writing permissions, you need to give permission to that user. In other words, the permissions should be 774/664. Please run the commands below:

sudo chown -R bitnami:daemon /opt/bitnami/apps/wordpress/htdocs/
find /opt/bitnami/apps/wordpress/htdocs -type d -exec chmod 0775 {} \;
find /opt/bitnami/apps/wordpress/htdocs -type f -exec chmod 0664 {} \;

Best Regards,

Juan Ariza

Thank you @jariza,

With the new permissions, I was able to update a few of the Plugins automatically and the Write Error disappeared from WP Super Cache :+1:

SNAFUs: Yoast SEO & Wordpress Translations not being updated/written :disappointed:

Updating Plugin Yoast SEO (1/1)
Downloading update from https://downloads.wordpress.org/plugin/wordpress-seo.5.7.1.zip…
An error occurred while updating Yoast SEO: Download failed. Destination directory for file streaming does not exist or is not writable.

Updating translations for WordPress (es_ES)…
Download failed. Destination directory for file streaming does not exist or is not writable.

Updating translations for WordPress (pt_BR)…
Download failed. Destination directory for file streaming does not exist or is not writable.

Any additional thoughts on this? Again, thank you for your help.

Best,
-scott

Hello @sleeilg

Great! You are getting close to solve the permissions issue.

You should be able to update the Translations and that plugin. Could you please run the command below and share the output with us?

ls -la /opt/bitnami/apps/wordpress/htdocs/wp-content/languages/
ls -la /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/ 

Best Regards,

Juan Ariza

Hi @arunazx46,

The permissions of these file look correct, could you please let us know more about your deployment?

  • The platform you are using
  • The action you are trying to perform
  • The WP version you have

Solved the issue; thanks for the reply.

sudo chown -R bitnami:daemon /opt/bitnami/apps/wordpress/htdocs/
find /opt/bitnami/apps/wordpress/htdocs -type d -exec chmod 0775 {} \;
find /opt/bitnami/apps/wordpress/htdocs -type f -exec chmod 0664 {} \;

Hi @arunazx46,

I also suggest you remove write permissions to the daemon group to the configuration file of WordPress to avoid security problems.

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