Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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.

share|improve this question
add comment

1 Answer 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).

share|improve this answer
    
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)." –  Rob Wilkerson Jul 10 '12 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). –  TheDeadMedic Jul 10 '12 at 13:53
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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