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.

8 thoughts on “WordPress Upgrade “Cannot Copy” FTP Permission Issue In Layman Terms

  1. 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….

    • admin says:

      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.

  2. 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)

    • admin says:

      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.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>