WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Could not copy file. Upgrade Fail (25 posts)

  1. James Laws
    The WP Ninjas
    Posted 3 years ago #

    I am getting the much maligned Upgrade fail message:

    Downloading update from http://downloads.wordpress.org/plugin/akismet.2.5.1.zip…

    Unpacking the update…

    Could not copy file

    This happens for every plugin and core upgrade. I've tried all the usual things like deleting the upgrade folder and changing permissions.

    I feel silly posting this but I'm at a loss. I am the server admin so I have full access but I'm not sure how to correct this. I also know that I was at one time able to do automatic upgrades but can't for the life of me think of anything that I've changed that would cause this.

    Any guidance would be greatly appreciated.

  2. Could not copy files means a permission issue, I believe.

    Have you upgraded PHP since the last time this works? It could have changed its settings and goobered this.

  3. James Laws
    The WP Ninjas
    Posted 3 years ago #

    Actually, no I haven't. I'm using PHP Version 5.2.13 and have been for a very long time. I agree that it's permission issues but not sure what to check at this point.

  4. Try deleting the folder wp-content/upgrade and recreating it with permissions 777.

  5. James Laws
    The WP Ninjas
    Posted 3 years ago #

    Yeah, I've done that. It doesn't seem to change anything. And to further confirm it's a file permissions issue, I can't delete plugins either.

  6. What are the file ownerships on the plugins folders?

    Has your server upgraded at all? I know cPanel pushed a small OS update out recently that kicked a lot of folks. And IIS too...

  7. James Laws
    The WP Ninjas
    Posted 3 years ago #

    I'm on a VDS and no cPanel. Main user (not root of course) is the owner of the plugins directory. And really all of WordPress.

  8. VDS = Virtual Dedicated Server? (TLAs are so annoying, at work VDS is Veteran's Data Services... My brain needs a reboot)

    So it's jameslaw:jameslaw owning the folders and files?

    What ID does PHP run under?

  9. James Laws
    The WP Ninjas
    Posted 3 years ago #

    Yes, Virtual Dedicated Server and ownership is correct. I think I need a reboot as well. :)

  10. Can't REALLY hurt.

    Or rather, if it does, there's your problem ;)

  11. James Laws
    The WP Ninjas
    Posted 3 years ago #

    I've also added these to my wp-config...

    define('FTP_HOST', '*********');
    define('ftp_user', '*********');
    define('FTP_PASS', '*********');
    define('FTP_SSL', true);
    define('FTP_CONTENT_DIR', '*********');
    define('FTP_PLUGIN_DIR', '*********');

    First time I've used them so not sure if that's a problem. It's all the same info I obviously use to sftp to my site normally.

  12. jpneok
    Member
    Posted 3 years ago #

    When trying to WordPress Autoupdate, make sure that you FIRST:

    0. Delete the Upgrade folder completely from your server
    1. Go into your Plugins page
    2. Click the checkbox above all of them to select ALL plugins
    3. From the pulldown, select DEACTIVATE, then OK it
    4. Try the update again - that usually takes care of the errors for me.
    5. Don't forget to re-enable your plugins as in Steps 1-3

  13. James Laws
    The WP Ninjas
    Posted 3 years ago #

    @jpneok, thanks. I've done all that before this thread and still have the problem.

    Also, concerning my comment above about the wp-config, I haven't actually moved my wp-content or plugins directory but the system doesn't seem to find them if I don't include those as well.

  14. The wp-config stuff shouldn't matter BUT!

    I haven't actually moved my wp-content or plugins directory but the system doesn't seem to find them if I don't include those as well.

    Now we're talking turkey!

    This is looking more and more like something got screwy with your server. I mean, WordPress RUNS without you defining those, right? But it won't upgrade. So the tricks PHP uses to upgrade can't find them, which could be ... Ugh. Brain not functioning fully.

    I want to say a base_dir redirect isn't working, but that feels WAY out there...

    Have you made ANY server changes since the last time this worked?

  15. esmi
    Forum Moderator
    Posted 3 years ago #

    I might be just muddying the waters here but this is beginning to sound similar to another issue: http://wordpress.org/support/topic/30-upgrade-bug-ftps

  16. James Laws
    The WP Ninjas
    Posted 3 years ago #

    The absolute only thing I changed, and I think (not positive) it has worked since this is I changed my root directory in httpd.conf. However WordPress should still see this as $base = '/'; so it shouldn't effect it in anyway.

    At least I don't think it should.

  17. James Laws
    The WP Ninjas
    Posted 3 years ago #

    @esmi I had a similar problem on another VPS server and they had to add something to the php install to fix it. This is hosted on another server that is not as good for support so I'm on my own. Although I've not actually gotten the "unable to create public_html" message here. This is specifically the plugin and core files that can't be copied, all standard server directories don't seem to be brought up like in the post you linked to.

  18. I changed my root directory in httpd.conf

    Honestly? Just because it SHOULD see it doesn't mean it IS ;)

    That would be what I'd start with.

  19. esmi
    Forum Moderator
    Posted 3 years ago #

    I'm pretty sure you have to make the changes in a few places in httpd.conf.

  20. James Laws
    The WP Ninjas
    Posted 3 years ago #

    Well, that's easier said than done. It's a corporate site that I can't take down. The site works except for that one thing which means it does see everything otherwise it wouldn't be able to load the theme or any of the plugins that are currently installed.

    It also downloads the correct file to the correct location. It just can't copy the files as needed. I'm not sure what I could even try to fix this at this point.

  21. James Laws
    The WP Ninjas
    Posted 3 years ago #

    @esmi, You do and I did. The site works fine, it's just this automatic upgrade that is failing.

  22. I wonder... if you search the wordpress database, are there refs to old base directory? I mean ... it totally shouldn't be in there, but it can't hurt to check.

  23. James Laws
    The WP Ninjas
    Posted 3 years ago #

    Just to check and because I am appreciative of you guys trying to help me I did a search and found nothing odd. Mostly because in WordPress my base directory would always have been / since it was the server root I changed and not where my files are located.

    I'm checking FTP logs as well and I see that it opens a session for the current user and then gives a line that begins with "PAM-warn". I'm not sure what that means yet but I know that's not what it does when I make a normal sftp connection with a client app.

  24. PAM warns are password management warnings, IIRC. There's a bad password being tossed in there, I would think.

  25. James Laws
    The WP Ninjas
    Posted 3 years ago #

    Problem solved. I had to play around with the wp-config options but I finally figured it out. Once I added define('FS_METHOD', 'ftpsockets'); all was good. I wasn't really familiar with all of these extra options so I had to play around with them a bit.

    Thanks to the both of you for helping me track this down.

Topic Closed

This topic has been closed to new replies.

About this Topic