Page 1 of 1

DELE command returns success when file does not exist

Posted: 2024-02-19 21:13
by VailComputerGuy
I have a backup application that allows me to provide an FTP server for the target (where the backup file is saved). I have FileZilla Server set up on a computer to accept these backups. Connection and login to FileZilla server is successful and works properly.

When the backup software runs it sends a DELE command to the FTP server so it can delete the files created by the same backup software during a previous backup. FileZilla server returns "250 File deleted successfully" even if the file does not exist. Since the backup application is expecting a "550 File not found" instead, it never continues to the next step.

This backup application splits the backups into pieces that have incremented filenames (like backup_0001.bak, backup_0002.bak, backup_0003.bak. etc.) so when it goes to delete the files before a backup, it starts by attempting to delete the previous files starting at the lowest number. It expects to be able to delete the files until it gets a File Not Found error, when it then starts the backup. If it never gets a File Not Found error, it will never start the backup.

Re: DELE command returns success when file does not exist

Posted: 2024-02-20 10:32
by oibaf
Thanks for reaching out about this.

The fix will be provided in the next release, and in the next nightly build already.

Re: DELE command returns success when file does not exist

Posted: 2024-02-20 17:00
by botg
Why would the backup software try to delete a file and expect it not to exist? That sounds very broken.

Re: DELE command returns success when file does not exist

Posted: 2024-02-21 00:15
by boco
My guess is that it doesn't know how many parts the previous backup series has, so, it just tries to delete one part after another until it hits a "not found" error, meaning the whole series has been deleted.