Log files

If you are like me, the linux log files can be a bit of a mystery. Sure, messages, syslog, secure or maillog can be fairly straightforward, but what is the story with all of these other log file? This page will document the other log files, who creates them and what utilities can access them.

The xferlog file contains logging information from the FTP server daemon, proftpd

This file usually is found in /var/log, but can be located anywhere by using a proftpd configuration directive. Each server entry is composed of a single line of the following form, with all fields being separated by spaces.

current-time transfer-time remote-host file-size filename transfer-type special-action-flag direction access-mode username service-name authentication-method authenticated-user-id completion-status

Rotate xferlog

To rotate xferlog create a new file /etc/logrotate.d/ftp. If you are running ProFTP, paste the following snippet into this file:

/var/log/xferlog {
postrotate /bin/kill -HUP `cat /var/run/pure-ftpd.pid 2> /dev/null` 2> /dev/null || true

Leave a Reply

Your email address will not be published. Required fields are marked *