Article Title: Build a simple vsftpd server in Linux. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
The main configuration file is as follows:
/Etc/vsftpd. conf main configuration file
/Etc/vsftpd. ftpusers: list of user names that prevent users from accessing the FTP server
/Etc/vsftpd. userlist controls the list of user names used to access the FTP server.
The userlist_deny parameter determines whether this is allowed or not.
FTP can be divided into two types: port ftp, that is, normal FTP, and PASVFTP, which are described as follows:
1. port ftp: this is a common form of FTP. First, a control channel is established. The default value is port 21, that is, it is established online with port 21 and commands are issued online. Second, the FTP server will establish a data transmission channel. The default value is 20, that is, it is established online with port 20, and data transmission is performed through port 20.
2. pasv ftp is similar to port ftp. First, a control channel is established. The default value is port 21, that is, it is established online with port 21 and commands are issued online. Second, the client will make a data transmission request, including the number of the data transmission port.
Create a simple FTP Server
1. Edit the/etc/vsftpd. conf file.
Anonymous_enable = YES
Local_enable = YES allow local users to access FTP
Write_enable = YES allow write
Local_umask = 022 default permission mask for files created by local users
Xferlog_enable = YES/* if it is started, the upload and download information will be fully recorded as defined in xferlog_file
File. It is enabled by default. */The default value is/var/log/vsftpd. log.
Connect_from_port_20 = YES
Xferlog_std_format = YES
If listen = YES/* is enabled, vsftpd is executed independently. If vsftpd is executed independently, as shown in figure
The default value of RedHat9 must be enabled. If vsftpd is included in xinetd, this function must be disabled, for example, RedHat8. the default value of RedHat9 is YES .*/
Tcp_wrappers = YES
2. Restart the VSFTPD service.
As long as the vsftpd service is enabled, an FTP with anonymous access is automatically enabled. The default access is the/var/ftp directory.
Restart VSFTP directly. The command is as follows:
[Root @ relay vsftpd] #/sbin/service vsftpd restart
3. Client Access
Method 1: ftp: // username: password @ ftpservername Enable User Access
Method 2: ftp: // ftpservername enables Anonymous Access
Method 3: Access in text mode, for example, access in a windows command prompt.