I setup WordPress on an Amazon EC2 instance. It\'s using Amazon Linux and is a standard setup (just php5 and mysql).
WordPress works fine, but there\'s some permission i
I set the owner to ec2-user:apache, then perform the hardening, then adjust the group read+write permissions for the folders.
sudo chown -R ec2-user:apache /vol/html
sudo chmod -R 755 /vol/html
sudo find /vol/html/ -type d -exec chmod 755 {} \;
sudo find /vol/html/ -type f -exec chmod 644 {} \;
sudo chgrp -R apache /vol/html
sudo chmod -R g+rw /vol/html
sudo chmod -R g+s /vol/html
Then edit /wordpress-install/wp-config.php and define the fs_method
define('FS_METHOD', 'direct');
Now wordpress can update/upload, etc. And you can still SFTP files without changing the permissions every time.