FTP 日志文件的语法是什么
What is the syntax of the FTP log file
我正在尝试通过我的一些 FTP 日志来检查我遇到的问题。但是日志文件有一些 shorthand 标志,我不知道它们是什么意思,而且我找不到任何类型的文档。
FTP 日志中的一行示例是:
Tue Jan 05 17:18:22 2016 0 1.2.3.4 3581 /path/to/file/file.php a _ o r username ftp 1 * c
日期和时间很明显,1.2.3.4
是我的 IP 地址,3581
我假设是 Linux PID,username
是我的 FTP 帐户用户名。
该行的结尾,a _ o r username ftp 1 * c
(username
和 ftp
除外)是我最困惑的地方。以及日期和我的 IP 地址之间的 0
。
有没有关于所有这些标志代表什么的文档?
基于 https://svn.apache.org/repos/asf/httpd/mod_ftp/trunk/modules/ftp/ftp_log.c,您有以下 ftp-specific 个变量:
These callbacks extend mod_log_config by adding additional
% directives as follows:
%..M The mode that was used to transfer the file.
A single character is printed, a (ascii) or b (binary)
%..F Any action that was taken on the file (concationated as needed)
C - file was compressed.
U - file was uncompressed.
T - file was tarred.
_ - no action taken.
%..d Direction the file was sent.
o - outgoing
i - incoming
%..W How the file was accessed.
r - real
a - anonymous
g - guest
%..S Service name, usually 'ftp'
%..Z Authentication method
0 - no auth
1 - rfc931 auth
%..Y Authenticated user id
* - if not available
"normal" Apache 变量可以在这里找到:https://httpd.apache.org/docs/2.4/mod/mod_log_config.html#formats
默认日志格式为(基于https://httpd.apache.org/mod_ftp/ftp/ftp_tls.html)
LogFormat "%{%b %e %H:%M:%S %Y}t %T %a %B %U %M %F %d %W %u %S %Z %Y" ftp_transfer
合起来好像是:
Date (%{%b %e %H:%M:%S %Y}t)
The time taken to serve the request, in seconds. (%T)
Client IP address of the request (%a)
Size of response in bytes, excluding HTTP headers. (%B)
The URL path requested, not including any query string. (%U)
The mode that was used to transfer the file, a=ascii, b=binary (%M)
Any action that was taken on the file (%F)
Direction the file was sento=outgoing, i=incoming (%d)
How the file was accessed (%W)
username (%u)
Service name, usually 'ftp' (%S)
Authentication method 0=none, 1=rfc9321 (%Z)
Authenticated user id *=n/a (%Y)
该日志行的格式似乎是 xferlog(5) 格式,传统上被许多 FTP 服务器使用。
我正在尝试通过我的一些 FTP 日志来检查我遇到的问题。但是日志文件有一些 shorthand 标志,我不知道它们是什么意思,而且我找不到任何类型的文档。
FTP 日志中的一行示例是:
Tue Jan 05 17:18:22 2016 0 1.2.3.4 3581 /path/to/file/file.php a _ o r username ftp 1 * c
日期和时间很明显,1.2.3.4
是我的 IP 地址,3581
我假设是 Linux PID,username
是我的 FTP 帐户用户名。
该行的结尾,a _ o r username ftp 1 * c
(username
和 ftp
除外)是我最困惑的地方。以及日期和我的 IP 地址之间的 0
。
有没有关于所有这些标志代表什么的文档?
基于 https://svn.apache.org/repos/asf/httpd/mod_ftp/trunk/modules/ftp/ftp_log.c,您有以下 ftp-specific 个变量:
These callbacks extend mod_log_config by adding additional
% directives as follows:
%..M The mode that was used to transfer the file.
A single character is printed, a (ascii) or b (binary)
%..F Any action that was taken on the file (concationated as needed)
C - file was compressed.
U - file was uncompressed.
T - file was tarred.
_ - no action taken.
%..d Direction the file was sent.
o - outgoing
i - incoming
%..W How the file was accessed.
r - real
a - anonymous
g - guest
%..S Service name, usually 'ftp'
%..Z Authentication method
0 - no auth
1 - rfc931 auth
%..Y Authenticated user id
* - if not available
"normal" Apache 变量可以在这里找到:https://httpd.apache.org/docs/2.4/mod/mod_log_config.html#formats
默认日志格式为(基于https://httpd.apache.org/mod_ftp/ftp/ftp_tls.html)
LogFormat "%{%b %e %H:%M:%S %Y}t %T %a %B %U %M %F %d %W %u %S %Z %Y" ftp_transfer
合起来好像是:
Date (%{%b %e %H:%M:%S %Y}t)
The time taken to serve the request, in seconds. (%T)
Client IP address of the request (%a)
Size of response in bytes, excluding HTTP headers. (%B)
The URL path requested, not including any query string. (%U)
The mode that was used to transfer the file, a=ascii, b=binary (%M)
Any action that was taken on the file (%F)
Direction the file was sento=outgoing, i=incoming (%d)
How the file was accessed (%W)
username (%u)
Service name, usually 'ftp' (%S)
Authentication method 0=none, 1=rfc9321 (%Z)
Authenticated user id *=n/a (%Y)
该日志行的格式似乎是 xferlog(5) 格式,传统上被许多 FTP 服务器使用。