0

I'm installing my first WP site for a client and I either pulled a recent, but not entirely up to date version or there was a very recent update. I'm being prompted to upgrade, which is fine, but it won't complete with the following:

Downloading update from http://wordpress.org/wordpress-3.4.1-partial-0.zip…

Unpacking the update…


Warning: copy(/opt/home/me/dev/client/www/wp-admin/includes/update-core.php) [function.copy]: failed to open stream: Permission denied in /opt/home/me/dev/client/www/wp-admin/includes/class-wp-filesystem-direct.php on line 200
Could not copy files.

Installation Failed

It feels like a permissions issue, but what I can't find -- other than this -- is a comprehensive list of what the perms should look like (particularly at the directory level). At this point, wp-content and all of its content is sitting at 777 (more open than I'd like).

I'm trying to use the auto install (presumably running as the apache user) on a code base in my home directory. What am I missing?

Thanks.

1 Answer 1

1

wp-content should be 755, otherwise WordPress will think it has global write access, and won't fallback to the FTP filesystem method if it doesn't.

Might be worth checking if PHP is running in safe mode - this can also be the troublemaker (though I'm aware WordPress can still upgrade with it on).

2
  • Is this correct? According to the link I was reading (codex.wordpress.org/Hardening_WordPress#File_permissions), wp-content is "User-supplied content: intended to be completely writable by all users (owner/user, group, and public)." Jul 10, 2012 at 13:28
  • Hmm, that might be legacy documentation there. Since 2.5, WP introduced filesystem transports (direct, FTP, SSH & sockets) to accomodate for various setups & ownership conflicts. Either way, wp-content should never be 777 (technically, neither should any other directory). Jul 10, 2012 at 13:53

Your Answer

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

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