WordPress.org

Ready to get started?Download WordPress

Forums

Could not copy files. Installation failed. (47 posts)

  1. bjprc
    Member
    Posted 5 years ago #

    Did not get any comments here but after discussing with my hosting service and explaining the permission issue, I got their comment as per below (might be of interest to some). I did the automatic update but I was then puzzled I was asked all login data for FTP to the server. Fortunately I did type in the right stuff (copied what my FTP was using) and the automatic upgrade worked against my expectation. So, solved.
    from the service provider:

    "In an effort to prevent compromises of WordPress blogs we recursively locked all 'wp-blog-header.php' files on the blog server. There was a known exploit that allowed writing to that file. I have removed all of the immutable attributes for your files in htdocs and you should now be able to change the permissions as you like.
    http://www.HostMySite.com

  2. penmaster91604
    Member
    Posted 4 years ago #

    What folder does the downloaded wordpress-2.8.zip file download to during the automatic upgrade? My hosting company wants to know which folder to set to 777.

  3. penmaster91604
    Member
    Posted 4 years ago #

    Okay, I figured it out. Set the permissions of the wp-content folder to 777. That's the folder where the wordpress-2.8.zip file gets downloaded to. The script creates a temporary folder inside wp-content, then downloads and unpacks the zip file from there, then erases the temporary folder when the script is finished.

  4. zhuoyang
    Member
    Posted 4 years ago #

    You can try add define('FS_METHOD', 'direct'); to wp-config.php
    it works for me

  5. zhuoyang
    Member
    Posted 4 years ago #

    I mean add "define('FS_METHOD', 'direct');" to wp-config.php without "".

  6. mindflow
    Member
    Posted 4 years ago #

    I'm getting closer :-/

    Added these to wp-config.php:
    define('FS_CHMOD_FILE',0777);
    define('FS_CHMOD_DIR',0777);
    define('FS_METHOD', 'direct');

    Then had to set permissions 777 to [/wp-content/upgrade/] folder

    Then I can actually see a verbose response.

    Downloading update from http://wordpress.org/wordpress-2.8.1.zip.
    Unpacking the update.
    Could not copy files.
    Installation Failed

    Almost sure that it's all caused by my server not running PHP as my user, they run PHP as a different user, and has caused me many many problems in the past :(

    Look for "suPHP" tip above, it will probably fix your issues.

  7. mindflow
    Member
    Posted 4 years ago #

    Note to QuadraHosting service users:

    QuadraHosting Support Ticket Response

    Hi Chris,

    This is not supported on the shared servers. This is too much of a security risk.

    Brenton Cassells
    Quadra Hosting
    http://www.quadrahosting.com.au

  8. herpsquad
    Member
    Posted 4 years ago #

    Anyone solve this. I am the owner of my server, and I get the same error. I have tried everything I could find. I see that it is downloading the zip file, but after it fails to copy the files, it deletes the download.

    I have no problem installing themes or plugins. I installed suphp on my server with no luck.

  9. gladman
    Member
    Posted 4 years ago #

    I chmod-ed wp-content to 777 (it was 755) and that worked for me.

  10. mrl144
    Member
    Posted 4 years ago #

    You shouldn't need to change permissions since wordpress is logging in as if you were logging in via FTP.

    All you need to do is rename the folder upgrade to 'upgrade2' and then rerun the upgrade automatically link. WP will recreate the upgrade folder and proceed.

  11. 02naked
    Member
    Posted 4 years ago #

    Well, mine works fine when using FTP on all plugin updates, but certain updateds fail when I use SFTP.

    Any thoughts?

  12. Samuel B
    moderator
    Posted 4 years ago #

    you might try adding the sftp port to the host name - like
    sftp.example.com:990

  13. Antonie Potgieter
    Member
    Posted 4 years ago #

    Check what your Apache user and group is that is used when executing PHP scripts. Ensure that all your WordPress files have this user and group set. No need to CHMOD to 0777. It is a security risk anyways.

  14. david102299wpo
    Member
    Posted 4 years ago #

    My "solution" to this problem was to rename ("mv" in linux) the

    ./wp-content/upgrade directory

    to

    ./wp-content/upgrade.moved.temp

    This was a suggestion on another website and it worked for me!

  15. hive101
    Member
    Posted 4 years ago #

    I'm getting the following error and could use some help figuring it out:

    Downloading update from http://wordpress.org/wordpress-2.8.4.zip.
    
    Unpacking the update.
    
    Verifying the unpacked files
    
    Installing the latest version
    
    Could not copy file: /path/to/wp/wp-admin/theme-install.php
    
    Installation Failed

    Thoughts?

  16. innovationcars
    Member
    Posted 4 years ago #

    We've had the same problem on a couple of WP installations. Weirdly - in hope rather than anything else - we tried using auto-update through Chrome instead of Firefox. Worked on every one!

  17. juicysauce
    Member
    Posted 4 years ago #

    It seems that there's no silver bullet to solve this issue, but contrid's comment above got me on the path to a solution that worked for me. Here's what I did:

    1. I FTPed into my server with Transmit (for OS X) and did a Get Info on a few of my WP directories. I noticed that wp-content was owned by a user in the "psacln" group but that my other folders were owned by root (in the "root" group).

    2. Using Terminal, I SSHed into my server as root and navigated to my WP directory.

    3. I performed a recursive CHOWN to change all the ownership of all files and folders to the user in the psacln group using this command:

    chown -R username:psacln .
    ("username" isn't the actual user; that's just an example. You'd need to put your actual FTP username there.)

    4. Back in the WP dashboard, I performed an automatic upgrade using the same user as my CHOWN command and voila!—it worked! For the first time ever!

    I'm a novice at all this server admin stuff, so I hope I didn't screw anything up in the process. Everything seems to be running fine, though. Thanks to everyone for their help, especially contrid.

Topic Closed

This topic has been closed to new replies.

About this Topic