HPlogo Installing and Administering Internet Services: HP 9000 Networking > Chapter 2 Installing and Configuring Internet Services

Configuring Logging for ftp

» 

Technical documentation

Complete book in PDF

 » Table of Contents

 » Index

You can log both ftp session information and file transfer information, as explained in the following sections.

Logging ftp Sessions

You can specify ftp session logging using the log commands keyword in the /etc/ftpd/ftpaccess file.

log commands

Enables or disables logging of an ftp session to syslog, including commands, logins, login failures, and anonymous ftp activity.

(This entry overrides the -L option specified for the ftp entry in/etc/inetd.conf.)

For details on the preceding keyword, see the ftpaccess(4) manpage.

NOTE: To enable the /etc/ftpd/ftpaccess file you must specify the -a option in the ftp entry of the /etc/inetd.conf file.

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/ftpd/ftpaccess File

To log incoming and outgoing ftp file transfers, edit the /etc/ftpd/ftpaccess file using the log transfers keyword.

log transfers

Enables or disables logging of file transfers for real or anonymous ftp users to /var/adm/syslog/xferlog. Logging of transfers to the server (incoming) can be enabled separately from transfers from the server (outbound).

For details on the preceding keyword, see the ftpaccess(4) manpage.

NOTE: To enable the /etc/ftpd/ftpaccess file, you must specify the -a option in the ftp entry of the /etc/inetd.conf file.

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
© 2000 Hewlett-Packard Development Company, L.P.