WordPress Upgrade “Cannot Copy” FTP Permission Issue In Layman Terms
Solution: Contact your webhost and ask them to change your ftp server to ProFTPd.
Oh my goodness, WordPress upgrades have been giving me such a headache! As previously posted in "Automatic Update Fail" I was only able to upgrade my accounts either manually or after deleting the "upgrade" folder myself. I had hoped that this would solve future problems, but with the release of WordPress 3.0.1, all my blogs were failing to upgrade (including plugin updates) giving me a variety of changing error messages saying some variation of "cannot copy /public_html/..." and it would give me a path to different files, usually ending in dev.css. After countless hours of messing around with file permissions through Filezilla and/or through the file manager in CPanel, after deactivating my plugins, after manually deleting the upgrade folder and the .maintenance.html file...I was extremely frustrated and nothing was solving the problem.
The repeated "solution" posted on several forums was to simply manually upgrade when things don't automatically upgrade...which works, but I'm a "why" person. It bugs me to not know why something is occurring and it's a pain to have to repeatedly manually upload & upgrade when you have several different WordPress blogs & plugins, as is my case.
The solution has been found and is resolved (knock on wood). I had read a few forums where people had mentioned a thing or two about ftp user permissions and how sometimes there are permissions problems with your ftp server. I honestly didn't understand it all (and still don't entirely) as I'm not a server person by any means, but my understanding was that it wasn't a permission issue that I was going to be able to manually change through Filezilla or the CPanel file manager and it had something to do with dhappache user or Nobody User permissions.
On a whim, I decided to check out my web host's forum to see if other folks were have similar issues. I found out they were, but there were no posted solutions besides the usual manual upgrade. Argh. I then checked out their twitter account and they had posted a link to a WordPress forum thread that explained this:
"From what I'm able to tell by looking at the logs during an upgrade or plugin installation, the script attempts to write to an invalid path (usually /public_html/somefile rather than /home/username/public_html/somefile) before using the correct path. It does this for each and every file, so during a major operation like an upgrade where a lot of files are involved it takes a very long time. Eventually the script freaks out and tries to access more memory than is allowed by our suhosin php security module. In most cases it attempts to access 256MB while our default limit is 32M. Suhosin blocks the script and the installation fails."
This made sense to me because I had used an .htaccess file to increase the amount that PHP memory could use and it helped for a plugin I was trying to upgrade, but it didn't solve my overall upgrading problems.
Long story short, I needed to contact my web host to change my ftp server so that instead of using pureFTPd, it uses proFTP. For now, whenever I want to upgrade, I have to send them a ticket (thankfully they respond quickly) and have them change it. When that is done, I do my upgrades and then let them know when I'm done so that they can change it back. Hopefully this will be fixed in the future, but for now, it's nice to know what the problem is and how to go about easy upgrades.
January 17th, 2011 - 21:20
Called GoDaddy for the FTP change and they said they did not have that option.
Have tried everything I can find now to update the plugins automatically and have not been able to make anything work….
Bummer….
April 6th, 2011 - 16:20
Bill – This blog linked to this post and pushed the issue a bit further. Maybe it’ll help:
http://voice.firefallpro.com/2011/04/wordpress-auto-update-fails-via-ftp.html
My webhost increased my memory limit to 64M by using a custom php.ini located in my root directory. They said I can also use this file to make future PHP overrides. They sent me to their wiki site to learn more about it: http://wiki.asmallorange.com/PHPOverridePhpIni.
Perhaps you can ask Godaddy support how you can increase your memory limit because that seems to be at the root of the problem. My updates have been a breeze since that was increased.
September 8th, 2010 - 16:19
This actually worked for me!
Thanks very much, I was going crazy, and switching to proFTP saved my mental sanity.
Kyr
September 9th, 2010 - 08:15
Glad this helped, it’s definitely nice to be able to take advantage of the WordPress auto-update features or at least know why they aren’t working.
September 3rd, 2010 - 14:16
Unfortunately I have my own linux server at home (Intel PIV 1.8 HT / 2GbRam, etc etc) just for my WP and PHP development.
I have full control on it, and since I have a XAMPP pack running I already have PROFTPD.
It doesn’t worked either. Also, I have set up PHP to have a memory usage allowed up to 512Mb (because I used to develop huge applications) but at the moment of the error message appeared it passed about 15 minutes. During that time, CPU was idle, same for I/O activity.
Also, every time it fails, happens on different files!
First time was reporting a file name that didn’t exist on the server.
I have no time now to keep investigating weird things, but as soon as I come up with something, will post it.
L8r!
.: Pampa :.
http://blog.icerock.com.ar (Coding Blog)
September 9th, 2010 - 08:19
Ah the joy of investigating weird things. Please keep me updated; I’m sure it’d help a lot of other people who come here with WordPress upgrading problems.