/var/log/xferlog

记录内容举例

Thu Sep 6 09:07:48 2007 7 192.168.57.1 4323279   /home/student/phpMyadmin-2.11.0-all-languages.tar.gz  b -i r student ftp 0 * c

/var/log/vsftpd.log

记录内容举例

Tue Sep 11 14:59:03 2007 [pid 3460]    CONNECT: Client "127.0.0.1"
Tue Sep 11 14:59:24 2007 [pid 3459] [ftp] OK LOGIN;Client "127.0.0.1" ,anon   password ”?"  

/var/log/xferlog日志文件中数据的分析和参数说明

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
guest@my.netusername
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

FTP数字代码的意义

110 重新启动标记应答。


120 服务在多久时间内ready。


125 数据链路端口开启,准备传送。


150 文件状态正常,开启数据连接端口。


200 命令执行成功。


202 命令执行失败。


211 系统状态或是系统求助响应。


212 目录的状态。


213 文件的状态。


214 求助的讯息。


215 名称系统类型。


220 新的联机服务ready。


221 服务的控制连接端口关闭,可以注销。


225 数据连结开启,但无传输动作。


226 关闭数据连接端口,请求的文件操作成功。


227 进入passive mode。


230 使用者登入。


250 请求的文件操作完成。


257 显示目前的路径名称。


331 用户名称正确,需要密码。


332 登入时需要账号信息。


350 请求的操作需要进一部的命令。


421 无法提供服务,关闭控制连结。


425 无法开启数据链路。


426 关闭联机,终止传输。


450 请求的操作未执行。


451 命令终止:有本地的错误。


452 未执行命令:磁盘空间不足。


500 格式错误,无法识别命令。


501 参数语法错误。


502 命令执行失败。


503 命令顺序错误。


504 命令所接的参数不正确。


530 未登入。


532 储存文件需要账户登入。


550 未执行请求的操作。


551 请求的命令终止,类型未知。


552 请求的文件终止,储存位溢出。  


553 未执行请求的的命令,名称不正确。