Problem
The man page for ftpd(ADMN) says that /usr/adm/xferlog is the
default ftp log file. How do I enable this logging? Solution
In the file /etc/ftpaccess, uncomment the following line:
# log transfers anonymous,real inbound,outboundso that it looks like this:log transfers anonymous,real inbound,outboundThis line follows the format "log transfers typelist directions".
Uncommenting this line enables logging of file transfers for either
real or anonymous FTP users. Logging of transfers TO the server
(incoming) can be enabled separately from transfers FROM the server
(outbound).The field "typelist" is a comma-separated list of any of the
keywords "anonymous", "guest", and/or "real". If the keyword
"real" is included, logging will be done for users using FTP to
access real accounts, and if the keyword "anonymous" is included,
logging will be done for users using anonymous FTP. For information
on the "guest" keyword, see the ftpaccess(SFF) manual page.The "direction" field is a comma-separated list of any of the two keywords "inbound" and "outbound" and will respectively cause transfers to be logged for files sent to the server and sent from the server.
The next ftp accesses will create the file /usr/adm/xferlog; subsequent access will be appended to the end of the log.
If /etc/ftpaccess has a line "log syslog" then comment it so that it looks like "#log syslog"
If the /usr/adm/xferlog file is not created then create it with:
# touch /usr/adm/xferlog
# chmod 666 /usr/adm/xferlogThe format of the output shown is, for example:
Fri Jul 30 07:20:51 2010 1 localhost 93 /tmp/xferlog b _ i r root ftp 0 * c Fri Jul 30 11:28:44 2010 1 localhost 882 /tmp/ftpaccess b _ i r root ftp 0 * c
See also
Man pages for ftpd(ADMN), ftpaccess(SFF), ftp(TC).