How do FTP servers handle rename to an existing file?

How do FTP servers normaly handle rename to a file that aready exist? That is, will the existing to-file be overwritten or will I get an error? Is there some specification about how FTP servers should handle this, or is it OS or implementation dependent?

vsftpd on Linux seems to overwrite, with FileZilla on Vista I get 550 file exists...


Solution 1:

After setting up quite a few FTP servers in my time I can say this is server specific. Some FTP servers have a feature where they will not send back a 550 error, but instead rename your upload to file.1, file.2, and so on. This is quite handy to preserve originals in case of accidental overwrite.

The FTP server I prefer to work with is Pure-FTPd. It has this feature with the -r switch:

- '-r': Never overwrite existing files. Uploading a file whoose name
already exists cause an automatic rename. Files are called xyz, xyz.1, xyz.2,
xyz.3, etc.