FTP XCRC and XMD5 Commands

Two useful commands for FTP are XCRC and XMD5.
Both commands are used to compute checksums on files which can be used for testing file integrity.

XCRC

The following text is taken from the SmartFTP web site.

The XCRC command uses a CRC (Cyclic Redundancy Check) algorithm to calculate the hash value of the file. This value can be used to verify the integrity of the file transfers. If the CRC value of the local and remote file matches both files are considered equal and therefore the transfer is successful.
If the server supports the XCRC command SmartFTP verifies the transfers. If the XCRC check fails, SmartFTP automaticallly renames the bad file and restarts the file transfer.

The XCRC feature is enabled in the "Global Queue" and the settings can be found in the Settings -> Transfer dialog.

List of FTP Servers supporting XCRC

  • RaidenFTPD
     
  • GlobalScape Secure Server
  • Titan FTP Server
  • Gene6 FTP Server
  • Serv-U
  • Blackmoon FTP Server
  • NoFeel FTP Server
  • In addition to this, a google search reveals that the following FTP programs also support XCRC

    FTP Voyager Client

    SyncBackSE    (Also lists which serves support MTDM for setting the time/date on uploaded files)

    WS-FTP Server

    FTPRush Client

    Because this is not an FTP standard, several flavours have evolved.

    One description says the format is

    XCRC "FileName" StartPos Length

    i.e. : XCRC "XXX.ZIP" 0 1356
     

    Note that the filename must be quoted and the start position is usually 0 and the end position is usually the end of the file - 1

     

    Another description has no Start and Length. It is

            XCRC FileName

            There is no mention of quoting the filename

     

    A third description has and Start position and an End position (which is different to a length parameter)

            XCRC FileName [start point [end point]

            The command can be given with no start or end point.
            The command can also be given with a start point (and no end point) and the CRC is
            calculated up to the end of the time.

     

    The response is

        250 - XCRC XXXXXXXX

        Where XXXXXXXX is the computed checksum.

     

    XMD5

    Gene6, NoFeel and Raiden also support the XMD5 checksum command which uses the MD5 algorithm.

    The format is believed to be in the same style as XCRC although the exact flavour of the command is unknown.

    (c) Roger Hardiman. 2005, 2007, 2009