Proftpd track everything to the xferlog log file named. In fact, many other FTP daemons write their log to a file with the same name and adopting the same format, so this tip can also affect those who use, for example, Wu-ftpd FTP or other standard BSD.

The xferlog file is usually located in one of the following directories:

/var/log
/var/log/proftpd/xferlog
/var/www/vhosts/{DOMAIN}/statistics/logs/xferlog_regular*

The last special case applies only to servers managed with Plesk.

The last character is provided in every row of the xferlog shows the way in which the transfer is completed. If the character is "c" means that the operation was completed successfully and if the character "i" means - to constrario - that the operation was not copmpletata and therefore the transfer was unsuccessful.

This command returns all transfers are incomplete:

egrep "i$" /path/to/xferlog

The three characters following the file name legend:

  1. transfer type (a = ascii b = binary)
  2. any particular action taken (usually shows the character "_" which is "no action")
  3. the transfer direction (o = outgoing, incoming = i, d = deleted)

To extract - for example - a list of all files uploaded successfully:

awk '($12 ~ /^i$/ && $NF ~ /^c$/){print $9}' /var/log/proftpd/xferlog

On the contrary, to extract a list of all files whose upload has failed:

awk '($12 ~ /^i$/ && $NF ~ /^i$/){print $9}' /var/log/proftpd/xferlog