Linux VSFTP Configuration and view the FTP log detailed

Source: Internet
Author: User
Tags system log

The Log settings for the FTP server can be implemented by modifying the primary configuration file/etc/vsftpd.conf. Options related to log settings in the main configuration file include Xferlog_enable, Xferlog_file, and dual_log_enable.
Xferlog_enable
If this option is enabled, log files that record server uploads and downloads are maintained. By default, the log file is/var/log/vsftpd.log. However, you can also specify additional files by using the Vsftpd_log_file option in the configuration file. The default value is No.
Xferlog_std_format
If this option is enabled, the transfer log file is written in a standard xferlog format, which defaults to/var/log/xferlog or can be set by the Xferlog_file option. The default value is No.
Dual_log_enable
If this option is enabled, two similar log files will be generated, by default in the/var/log/xferlog and/var/log/vsftpd.log directories. The former is a wu-ftpd type of transport log, which can be analyzed using standard logging tools, and the latter is a vsftpd type of log.
Syslog_enable
If this option is enabled, the log that should have been exported to/var/log/vsftpd.log will be exported to the system log.
Common log solutions are as follows:

Xferlog_enable=yes
Xferlog_std_format=yes
Xferlog_file=/var/log/xferlog
Dual_log_enable=yes
Vsftpd_log_file=/var/log/vsftpd.log

This scenario sets the xferlog_enable to Yes, indicating that the FTP server records upload downloads and that the Xferlog_std_format is set to Yes, which means that the uploaded download of the record is written in the file specified by Xferlog_file. Var/log/xferlog files.
At the same time, the scheme enables dual_log_enable, indicating that two logs are enabled. When the server uploads the download with the Xferlog file, the file specified by Vsftpd_log_file, that is,/var/log/vsftpd.log, will also be used to record the transmission of the server.
View the contents of the Xferlog and Vsftpd.log files separately below.
Xferlog contents are as follows:

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
Thu Sep 6 10:15:59 2007 1 192.168.57.1
61810/home/student/php-pdo-5.1.6-5. El5.
i386.rpm B _ i R student FTP 0 * C
Thu Sep 6 10:17:13 2007 1 192.168.57.1
83741/home/student/php-mysql-5.1. 6-5.el5.i386.
RPM B _ I R student FTP 0 * C
Tue Sep 11 07:49:34 2007 1 127.0.0.1 0/
Pub/hello.txt B _ o a bit@bit.edu.cn ftp 0 * I
Tue Sep 11 07:51:22 2007 1 127.0.0.1 34/
Pub/hello.txt B _ o a bit@bit.edu.cn ftp 0 * C
Tue Sep 11 11:23:05 2007 1 192.168.57.1
83741/php-mysql-5.1.6-5.el5.i386.rpm A _ o r student FTP 0 * C
Tue Sep 11 11:31:36 2007 1 192.168.57.1
12/eng000.txt A _ I R student FTP 0 * C
Tue Sep 11 11:53:05 2007 1 192.168.57.2
367/user_list B _ i R student FTP 0 * C
Tue Sep 11 11:56:06 2007 1 192.168.57.2
0/b _o a mozilla@example.com FTP 0 * I
Tue Sep 11 11:57:36 2007 1 192.168.57.2
0/b _ o r Student FTP 0 * I

The contents of the Vsftpd.log file are as follows:

Tue Sep One 14:59:03 2007 [PID 3460] connect:client "127.0.0.1"
Tue Sep One 14:59:24 2007 [PID 3459] [FTP]
OK login:client "127.0.0.1", anon password "?"

In the first record of the Xferlog file, the parameter names for each data are shown in table 11.3.
Table 11.3 Xferlog The name of the parameter of the file data

Table 11.4 describes the specific meaning of each parameter.
Table 11.4 Xferlog Parameter description

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.