• Resolved jimsky7

    (@jimsky7)


    Just updated SSH SFTP update support from 0.8.1 to version 0.8.2. After updating it, went to install another plug-in (health check) and got message like this:
    Installation failed: Could not copy file. health-check/assets/css/health-check.css

    Also attempted to update (not install in these cases but update) two other plug-ins. Got similar failures, various filenames depending on plug-in I attempt to upgrade, on each upgrade attempt

    Downgraded to 0.8.1 (by reloading the old version of plug-in via SFTP) and then was able to both install and upgrade the other plug-ins without error. But then upgraded self to 0.8.2 and immediately got the error messages again.

    Did not change any file permissions between attempts. Did check that the owner and group are correct on all files within the plug-ins I attempted to update.

    “FTP” credentials all included within wp-config. Nothing else broken or suspicious on the affected two sites. Sites are on same server but different docroots (and not WP-MU)

    WP is 5.2.2. And using PHP 7.3 however, which does seem to have some issues of other sorts. I did a quick eyeball of the error logs for the affected sites and did not see anything related to this plug-in.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter jimsky7

    (@jimsky7)

    Might be worth adding that wp-config.php contains lines defining these constants:

    define (‘FS_METHOD’, ‘ssh2’);
    define (‘FTP_BASE’, ‘/var/www/example/’);
    define (‘FTP_CONTENT_DIR’, ‘/var/www/example/wp-content/’);
    define (‘FTP_PLUGIN_DIR’, ‘/var/www/example/wp-content/plugins/’);
    define (‘FTP_USER’, ‘myusername’);
    define (‘FTP_PASS’, ‘mypassword’);
    define (‘FTP_HOST’, ‘example.com’);
    define (‘FTP_SSL’, false);

    …with of course the correct data in them. Interestingly, when I commented out these lines in wp-config.php just now, and updated plug-ins and added one plug-in, the ssh-sftp-updater-support now asked me for log-in name and password and then it worked correctly. No errors. Honestly I would rather not have my STFP username and password in the config, so I think I’ll remove them, but perhaps there’s an error associated with having them defined rather than obtained interactively?

    Thread Starter jimsky7

    (@jimsky7)

    More. If I only include in wp-config.php
    FS_METHOD
    FTP_BASE
    FTP_HOST
    …it runs properly. If I add…
    FTP_CONTENT_DIR
    …then all operations fail. Adding a plug-in fails. Updating fails. Deleting fails. I then remove the define for FTP_CONTENT_DIR and they work again.

    Plugin Author David Anderson / Team Updraft

    (@davidanderson)

    Hi Jim,

    Your description means that the FTP_* constants that you have got in your wp-config.php file are wrong. The recent release started, according to the documentation, respecting these constants (previously documentation said they were used, but in fact a subtle bug meant they were ignored). Apparently your site doesn’t need them, and they’re set incorrectly – so, removing them is the right thing to do.

    David

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Installation failed: Could not copy file blah.php’ is closed to new replies.