I'm getting a tiny bit fed up with having to chown 777 my entire WordPress folder in order to auto update a plugin, and then set the permissions back again. I've looked around for fixes now, but no fix I try seems to work.

I'm on an Amazon EC2 instance running Ubuntu 12.04. So, the Apache2 installation is stock standard out of the box, runs as the www-data user.

I've set my owner:groups to my entire project to ubuntu:www-data, and the permissions through the bank is set to ***rwxrwx--r**, or 774, meaning that either the ubuntu user, or the www-data group will have full read/write access to the file structure.

Whenever I try to update WordPress however, it asks me for FTP/SFTP details, so in order to get that going away, I need to run chown -R 777 ... on the entire project folder.

That's annoying, and I've got no clue as to why this is happening. How can WordPress execute something other than the Apache2 user?

  • 2
    At this time there are more than 31000 posts tagged "wordpress" at Stackoverflow... Is Stackoverflow gonna move all of them here too? For goodness sake, I don't want a 101 profiles lying everywhere, and I'm probably not going to ask a lot of Wordpress questions. Maybe it's time for me to start using a different QA service that don't move your questions to another site just because they feel like it. Your stupid WhateverExchange rules and regulations are starting to piss me off. May 17, 2013 at 7:11

1 Answer 1


Found a fix. Simply add the following snippet to functions.php for your theme:

if(is_admin()) {
    add_filter('filesystem_method', create_function('$a', 'return "direct";' ));
    define( 'FS_CHMOD_DIR', 0751 );

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.