DELE command returns success when file does not exist
Posted: 2024-02-19 21:13
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.
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.