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.

On every site where I updated Wordpress to version 3.5, two error messages flashed onto the screen, only to be immediately replaced by the Wordpress About page. The messages don't stay on the screen long enough to read, but I managed to hit PrintScreen and read them that way.

Note: this has happened with previous updates, but I can't be sure when it started because I may not have noticed the errors before, and the sites all seem to work fine.

Warning: copy(/home/something/wordpress/wp-blog-header.php) 
[function.copy]: failed to open stream: Permission denied in 
/home/something/wordpress/wp-admin/includes/class-wp-filesystem-direct.php on line 200

Warning: copy(/home/something/wordpress/index.php) 
[function.copy]: failed to open stream: Permission denied in 
/home/something/wordpress/wp-admin/includes/class-wp-filesystem-direct.php on line 200

Update: there are really two issues here: first, what are the warnings telling me, are they serious, and can I prevent them from happening? Second, wouldn't it be a good idea to leave the warnings on the screen instead of flashing them up, only to have them disappear into the abyss milliseconds later? I can't help wondering whether more serious warnings/errors might also disappear if/when they occurred. Are these warnings logged anywhere?

share|improve this question
    
These are not error messages, it quite clearly says they are Warnings, not errors. –  Tom J Nowell Dec 14 '12 at 12:30
    
I've ammended the tags and title accordingly –  Tom J Nowell Dec 14 '12 at 12:32
    
@Tom: Thanks for straightening me out on that. Since there's such a big difference between errors and warnings, perhaps you could explain it to me. Is it okay to ignore warnings? Also: 'amended'. –  boot13 Dec 14 '12 at 14:05
    
Warnings lights on a car don't make you crash but engine errors do ( explosive errors cook you to a crisp, mechanical errors might mangle you ), but you shouldn't ignore them ( low fuel warning on a motorway/freeway won't ruin your drive but you should probably take some note ). –  Tom J Nowell Dec 14 '12 at 15:39
    
Generally, the number of warnings a PHP codebase gives demonstrates the quality of the code and the developer, or that some configuration is not done correctly, in this case, your file/folder permissions aren't appropriate for an onsite updater ( which is actually good security practice ). –  Tom J Nowell Dec 14 '12 at 15:40

2 Answers 2

The issue is that the files cannot be written to by the web/php process due to permissions.

This is:

  • Good! Those files can't be updated with malware and other nasty surprises
  • Bad! The updater cant update them either

So, I'd advise you do the following:

  • Follow these chmod settings religiously What is true chmod for WordPress?
  • Never use the auto-updater again. Instead use a more foolproof method such as an svn/git command, or downloading WordPress and uploading the new copy via FTP

This gives you a foolproof method of updating WP Core, without setting the write permissions in such a way that it compromises your security for the sake of convenience.

Given the warnings, I'd recommend doing the procedure again via FTP, clearly those files may not be the v3.5 files but older ones that it couldn't write to.

share|improve this answer
    
The files in question have the 'correct' permissions, just like all the other files that were successfully updated without any warnings. Why the warnings on these two files only? I don't want to give up on the auto-updater; I would rather figure out what's going on and work around it. I compared the two files with vanilla Wordpress 3.5, and they are identical, but they may not have changed in this version. Also, it seems clear from the timestamps on the files that the updater actually did update them, in which case, what's the warning about? –  boot13 Dec 14 '12 at 17:24
    
Again, 'correct' is a relative term, depending on your goal. Secure WordPress and writable WordPress are very different things, and CHMOD tutorials and howtos always aim for security over convenience. –  Tom J Nowell Dec 15 '12 at 1:56
    
Okay, if not 'correct' what word should I use? You advised me to follow the (oddly-titled) 'What is true chmod for WordPress?' settings 'religiously'. So maybe I should have said the files had the 'true' permissions. But the questions from my previous comment remain unanswered. –  boot13 Dec 15 '12 at 3:59

Give your files/folders the right CHMOD (I assume 755 for folders) Edit: This answer should answer all your questions ;) What is true chmod for WordPress?

share|improve this answer
    
The files in question have the appropriate permissions (644). –  boot13 Dec 14 '12 at 14:14

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.