Technical article 107640

How to turn on ftp logging.

OpenServer 6.0.0OpenServer 5.0.0OpenServer 5.0.2OpenServer 5.0.4OpenServer 5.0.5OpenServer 5.0.6OpenServer 5.0.7

Written · Last revised

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,outbound
so that it looks like this:
log transfers anonymous,real inbound,outbound
This 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/xferlog

The 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).

From the Xinuos technical article database, record 107640. Reproduced with permission. The original is at www.sco.com/ta/107640, which is reachable but blocked from search engines.

Next step

Need this fixed rather than explained?

Tell us the release, what the system runs and what it is doing. We will reply by email with what we would do next.

  • You deal with the people who do the work
  • No obligation, and no upgrade required before we will help
  • We tell you plainly if something is not worth doing

Send an enquiry

We reply by email. If a server is down, say so in the first line. You can also write to help@scoexpert.com.