Search code examples
wordpressamazon-web-servicesamazon-ec2bitnami

Correct permissions for Bitnami / EC2 WordPress


I'm trying to find the correct permissions setup for a WordPress site running on Bitnami / EC2. Right now, my /apps/wordpress/htdocs directory is set to daemon:bitnami. With this setup the site works, but I can't install or update plugins. I also can't edit anything over FTP. The FTP user is "ubuntu".

I've tried changing the /htdocs/ owner to ubuntu, which lets me edit files via FTP, but then site won't load.

I've read this post http://blog.david-jensen.com/wordpress-amazon-ec2-apache-permissions-wordpress/ which suggests changing the owner to apache:apache, but I don't think this is applicable to Bitnami installs... and I'm worried about further messing up permissions.

What is the ideal permissions / user setup to allow editing via FTP and plugin updates without having to enter credentials, without compromising security?


Solution

  • I left owners as daemon:bitnami and set wp-content to 775 permissions. To get plugin updates to work, I also needed to add the following to wp-config.php:

    define('FS_METHOD', 'direct');
    define( 'WP_TEMP_DIR', ABSPATH . 'wp-content/tmp/');
    

    And create the tmp directory under wp-content.