FTPS create test file failure

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #400334
    Stanislav Sokolov
    Participant

    Hi.

    I’ve just purchased a $15 SFTP-SCP-FTPS backup plugin to be able to do backups to my FTP server, which is configured to only accept TLS connections.
    Before the server was unsecured, the free plugin worked fine. Now I get the following error:

    FTP settings test result: Failure: we successfully logged in, but were not able to create a file in the given directory. This is sometimes caused by a firewall – try turning off SSL in the expert settings, and testing again.

    Messages:
    * PHP event: code E_WARNING: ftp_nb_fput(): php_connect_nonb() failed: Operation now in progress (115) (line 926, wp-content/plugins/updraftplus/addons/sftp.php)
    * PHP event: code E_WARNING: ftp_nb_fput(): Switching to Binary mode. (line 926, wp-content/plugins/updraftplus/addons/sftp.php)

    As the server is TLS-secured, disabling the SSL would give this error, which is expected:

    FTP settings test result: Failure: we did not successfully log in with those credentials.

    Messages:
    * PHP event: code E_WARNING: ftp_login(): Non-anonymous sessions must use encryption. (line 787, wp-content/plugins/updraftplus/addons/sftp.php)

    Now, I can connect to the FTP server from FileZilla and access the folder in question. The path is:
    /1TB/backup
    From FileZilla I can create a file in that directory.

    I also tried alternative paths in the plugin configuration:
    1TB/backup
    1TB/backup/
    /1TB/backup/

    I tried “Do not verify SSL certificate” option to no avail.

    If I disable “Passive mode”, I get an empty file, name like “eee4b61b4587fc32d53555548a8c124a.tmp” in the folder, but the test would still report a (different) error:

    FTP settings test result: Failure: we successfully logged in, but were not able to create a file in the given directory. This is sometimes caused by a firewall – try turning off SSL in the expert settings, and testing again.

    Messages:
    * PHP event: code E_WARNING: ftp_nb_fput(): Failed to establish connection. (line 926, wp-content/plugins/updraftplus/addons/sftp.php)

    Please advise how to make the plugin work or how to refund $15 if there is no fix.

    #400361
    Bryle Crodua
    Moderator

    Hi,

    It appears to be a file permission/ownership issue, meaning UpdraftPlus or WordPress does not have the correct read or write permission to the backup folder.

    The following article on Smashing Magazine is a good guide as to the file permissions/ownerships that are required for WordPress: https://www.smashingmagazine.com/2014/05/proper-wordpress-filesystem-permissions-ownerships/#file-and-folder-ownership-for-wordpress

    Regards,
    Bryle

    #400373
    Stanislav Sokolov
    Participant

    I am not sure that the permissions on the WordPress server is the problem.
    I now temporarily disabled TLS on the FTP server and the test was run successfully:
    “FTP settings test result: Success: we successfully logged in, and confirmed our ability to create a file in the given directory (login type: non-encrypted)”
    FTP server is hosted on my Asus Rt-AC5300 router running the latest Asuswrt-Merlin firmware.
    WordPress site is hosted by an external hosting service.
    Or do you mean to say that when a TLS connection is made that the plugin needs to write something on the WordPress side and fails?

    EDIT: I’ve checked the permissions on the server:
    wp-content 755
    wp-content/updraft 755 (all files under are 644)
    wp-content/plugins 755
    wp-content/plugins/updraftplus 755 (all folders under er 755 and files are 644)
    wp-content/plugins/updraftplus/addons/sftp.php this file is 644

    #400917
    Bryle Crodua
    Moderator

    Hi,

    Could you try to run a test backup? Just go to “Backup/Restore” tab and click the “Backup Now” button.

    Do you receive any errors when backing up site?

    Kind Regards,
    Bryle

    #401061
    Stanislav Sokolov
    Participant

    Hi!

    I got the following:

    Mon, June 17, 2019 20:10
    Waiting until scheduled time to retry because of errors

    And the following fragment from the log:

    0115.797 (1) Saving backup history. Total backup size: 133.3 MB
    0115.809 (1) Requesting upload of the files that have not yet been successfully uploaded (5)
    0115.811 (1) Cloud backup selection (1/1): ftp with instance (1/1) (last)
    0115.812 (1) Beginning dispatch of backup to remote (ftp) (instance identifier s-439b19716fc27925692371a3ae33d955)
    0117.879 (1) FTP: upload attempt: redacted.zip -> ftp://redacted.zip
    0118.244 (1) PHP event: code E_WARNING: ftp_nb_fput(): php_connect_nonb() failed: Operation now in progress (115) (line 926, wp-content/plugins/updraftplus/addons/sftp.php)
    0118.247 (1) PHP event: code E_WARNING: ftp_nb_fput(): Could not get file size. (line 926, wp-content/plugins/updraftplus/addons/sftp.php)
    0118.248 (1) FTP upload: error (0)
    0118.248 (1) FTP: ERROR: FTP upload failed
    0118.249 (1) An error condition has occurred for the first time during this job
    0118.250 (1) FTP: upload attempt: redacted.zip -> ftp://redacted.zip
    0118.608 (1) PHP event: code E_WARNING: ftp_nb_fput(): php_connect_nonb() failed: Operation now in progress (115) (line 926, wp-content/plugins/updraftplus/addons/sftp.php)
    0118.610 (1) PHP event: code E_WARNING: ftp_nb_fput(): Entering Passive Mode (*IP redacted*). (line 926, wp-content/plugins/updraftplus/addons/sftp.php)
    0118.610 (1) FTP upload: error (0)
    0118.611 (1) FTP: ERROR: FTP upload failed

    …etc

    When I FTP to the WP site, I see the resulting zip files are in the wp-content/updraft folder.

    The only difference is still if TLS is enabled on the FTP backup server. If TLS is disabled, then Updraft plugin successfully uploads the files, if TLS is enabled, then upload fails.

    #401504
    Dee Nutbourne
    Moderator

    Hi,

    Apologies for the delay.

    Would it be possible to send us FTP credentials for the FTP server, so we can run some tests directly?

    If so, please could you send them as a support ticket here:
    https://updraftplus.com/paid-support-requests/

    In the description, please include the URL for this thread and ask for the ticket to be assigned to ‘Dee’

    Best Wishes,
    Dee

    #401566
    Stanislav Sokolov
    Participant

    Done.

    #412403
    itsupport6
    Participant

    Was this issue resolved and if so how? I am experiencing exactly the same symptoms described so well by Stanislav. Other FTP clients can connect successfully using explicit FTPS without issue and create and delete files. However when Updraft Plus attempts to connect I receive all of the same combination of errors described above, including most notably “php_connect_nonb() failed: Operation now in progress”. UpdraftPlus works as expected using unencrypted FTP using the same credentials so it is unlikely to be a permissions issue.

    Any suggestions or advice would be greatly appreciated.

    #412732
    Bryle Crodua
    Moderator

    Hi,

    The specific warnings that you are seeing are ususally cause by the FTP control channel being open, but the data channel not (i.e. the server can initially connect to the FTP server, but cannot send data).

    FileZilla and other clients are not experiencing this issue, as they are connecting from your local machine, rather than the webserver.
    Your hosts should be able to configure the webserver firewall to allow the connection.

    Best Wishes,
    Bryle

    #413189
    itsupport6
    Participant

    That did the trick. We reached out to our hosting provider and they were able to whitelist the IP address of our FTP server at which point Updraft Plus was able to successfully transmit our backups using FTPS.

    Thanks for your help.

    #413555
    Bryle Crodua
    Moderator

    Hi,

    Great! Glad the issue is resolved now.

    Regards,
    Bryle

Viewing 11 posts - 1 through 11 (of 11 total)
  • The topic ‘FTPS create test file failure’ is closed to new replies.