---
title: "vsftpd日志(xferlog格式)的含义"
author: "kenbli"
date: "2011-06-09T11:33:44Z"
tags: [".net", "Access", "C", "C#", "C++"]
categories: ["编程语言"]
slug: "vsftpd-xferlog"
draft: false
lastmod: "2011-06-09T11:33:44Z"
id: 1074058
url: "https://wasabi.iteye.com/blog/1074058"
---

原帖： http://bbs.chinaunix.net/viewthread.php?tid=697954&page=1&extra=page%3D1#pid4725282

引用：*Thu Mar 4 08:12:30 2004 1 202.114.40.242 37 /incoming/index.html a _ o a \[email]guest@my.net\[/email] ftp 0 * c*

Thu Mar 4 08:12:30 2004 **current-time**     
1                                       **transfer-time**   
202.114.40.242                **remote-host**     
37                                     **byte-count**    
/incoming/index.html         **filename**   
a                                       **transfer-type**   
_                                       **special-action-flag**  
o                                       **direction**  
a                                       **access-mode**  
\[email]guest@my.net\[/email]                  **username**  
ftp                                     **service-name**  
0                                       **authentication-method**  
*                                       **authenticated-user-id**  
c                                       **completion-status**  
   
**current-time**    The current local time in the form "DDD MMM dd hh:mm:ss  
    YYYY", where DDD is the day of the week, MMM is the month,  
    dd is the day of the month, hh is the hour, mm is the min-  
    utes, ss is the seconds, and YYYY is the year.

**transfer-time**   The total time of the transfer in seconds.

**remote-host**     The remote host name.

**byte-count**      The amount of transferred bytes.

**filename**     The canonicalized (all symbolic links are resolved) abso-  
    lute pathname of the transferred file.

    In case of the chrooted FTP session this field can be  
    interpreted as the pathname in the chrooted environment  
    (the default interpretation) or as the one in the real  
    file system. The second type of interpretation can be  
    enabled by the command-line options of the ftpd(8).

**transfer-type**   The single character that indicates the type of the trans-  
    fer. The set of possible values is:

    a  An ascii transfer.

    b  A binary transfer.

**special-action-flag**  
    One or more single character flags indicating any special  
    action taken. The set of possible values is:

    _  No action was taken

    C  The file was compressed (not in use).

    U  The file was uncompressed (not in use).

    T  The file was tar'ed (not in use).

**direction**     The direction of the transfer. The set of possible values  
    is:

    o  The outgoing transfer.

    i  The incoming transfer.

**access-mode**     The method by which the user is logged in. The set of pos-  
    sible values is:

    a (anonymous)  The anonymous guest user.

    g (guest)    The real but chrooted user (this capability  
   is guided by ftpchroot(5) file).

    r (real)    The real user.

**username**     The user's login name in case of the real user, or the  
    user's identification string in case of the anonymous user  
    (by convention it is an email address of the user).

**service-name**    The name of the service being invoked. The ftpd(8) utility  
    uses the \`\`ftp'' keyword.

**authentication-method**  
    The used method of the authentication. The set of possible  
    values is:

    0  None.

    1  RFC931 Authentication (not in use).

**authenticated-user-id**  
    The user id returned by the authentication method. The \`\*'  
    symbol is used if an authenticated user id is not avail-  
    able.

**completion-status**  
    The single character that indicates the status of the  
    transfer. The set of possible values is:

    c  A complete transfer.

    i  An incomplete transfer.

vsftpd与log有关的选项：  
vsftpd\_log\_file  
xferlog\_enable  
**xferlog\_std\_format**  
xferlog\_file  
dual\_log\_enable  
syslog\_enable  
log\_ftp\_protocol  
no\_log\_lock

 

*参考*  
*1etony vsftpd.conf 联机手册 [http://fanqiang.chinaunix.net/app/ftp/2005-06-24/3337.shtml](http://fanqiang.chinaunix.net/app/ftp/2005-06-24/3337.shtml)*  
*2wolfg   vsftpd日志(xferlog格式)的含义[http://www.chinaunix.net/jh/15/698727.html](http://www.chinaunix.net/jh/15/698727.html)*  
*3man vsftpd.conf----推荐*  
*4eagerlinuxer 《用AWStats对VSFTP日志进行统计》[http://www.chinaunix.net/jh/15/388056.html](http://www.chinaunix.net/jh/15/388056.html)*

*vsftpd.conf  [http://vsftpd.beasts.org/vsftpd\_conf.html](http://vsftpd.beasts.org/vsftpd_conf.html)*  
*vsftpd日志格式XFERLOG(5)  [http://bsdftpd-ssl.sc.ru/doc/unix/xferlog.5.txt](http://bsdftpd-ssl.sc.ru/doc/unix/xferlog.5.txt)*