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.

Read More

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?

Related posts

3 comments

  1. I would not mess with the owners, but leave the originals (bitnami:daemon to /opt/bitnami/apps/wordpress/htdocs). There are a few exceptions (e.g. the whole wp-content should have 775 permissions).

    To connect to your instance, you can use SFTP instead, which is also more secure and will let you upload files to /opt/bitnami. It is documented in the Bitnami wiki here: https://wiki.bitnami.com/BitNami_Cloud_Hosting/Servers/Access_your_machine#Upload_your_files_with_SFTP

  2. I’m not familiar with bitname, thus my answer might a bit off, but you could keep the permission as daemon:bitnami and add the FTP user “ubuntu” to bitnami group?

  3. 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.

Comments are closed.