You can log both ftp session information and file transfer
information, as explained in the following sections.
Logging ftp File Transfers |
|
You can log file transfer information from the ftp server
daemon to the /var/adm/syslog/xferlog log file. The xferlog file records file transfer information such as
current time, file transfer time, remote host, filename, file size,
whether the file transfer was in ascii or binary format, etc. For
details on all types of information recorded in the xferlog file, see the xferlog(5) manpage.
You can enable file transfer logging either by editing the /etc/ftpd/ftpaccess file or by editing the /etc/inetd.conf file. Each of these methods is described following.
Configuring Logging in the /etc/inetd.conf File
To log incoming and outgoing ftp file transfers, edit the
/etc/inetd.conf file using the -i and -o options with the ftp entry.
- -i
This option logs all the incoming files received
by the ftp server to the /var/adm/syslog/xferlog log file. This option is overridden by the log transfers entry in the /etc/ftpd/ftpaccess file.
- -o
This option logs all outgoing files transmitted
by ftpd to /var/adm/syslog/xferlog. This option is overridden by the log transfers entry in the /etc/ftpd/ftpaccess file.
Example of Configuring Logging in /etc/inetd.conf
In the following example, the /etc/inetd.conf entry logs both incoming and outgoing ftp file
transfers.
ftp stream tcp nowait root /usr/lbin/ftpd ftpd -a -l -d -i -o
|