VSFTPD installation (Linux)
First, installation system environment
CentOS 6.9 64-bit
Second, vsftpd version
Vsftpd-2.2.2-24.el6.x86_64
Third, installation steps
1. Installation
Execute yum-y Install VSFTPD
eg
(1) Whether or not to use sudo permissions to execute, depending on your specific environment to decide
(2) Rpm-qa |grep vsftpd can be checked by this check if it is already installed VSFTPD
(3) The default configuration file is/etc/vsftpd/vsftpd.conf
2. Create a virtual user
(1) Select Create FTP folder under root or user directory: mkdir ftpfile
(2) Add anonymous User: Useradd ftpuser-d/ftpfile-s/sbin/nologin
(3) Modify Ftpfile permissions: Chown-r ftpuser.ftpuser/ftpfile
(4) Reset ftpuser password: passwd ftpuser
3. Configuration
(1) cd/etc/vsftpd
(2) sudo vi chroot_list
(3) Add the new virtual user to this configuration file, follow up to reference
(4): Wq exit
(5) sudo vi/etc/selinux/config, modified to selinux=disabled
(6): Wq Save exit
Eg: if one will verify when sprayed to 550 deny access please perform:
sudo setsebool-p ftp_home_dir l
Then restart the Linux server and execute the reboot command
(7) Execution: #sudo vi/etc/vsftpd/vsftpd.conf
4. Firewall configuration
(1) Vi/etc/sysconfig/iptables
(2) #vsftpd
-A input-p TCP--dport 61001:62000-j ACCEPT
-A output-p TCP--sport 61001:62000-j ACCEPT
-A input-p TCP--dport 20-j ACCEPT
-A output-p TCP--sport 20-j ACCEPT
-A input-p TCP--dport 21-j ACCEPT
-A output-p TCP--sport 21-j ACCEPT
(3): Wq Save exit
(4) sudo service iptables restart (restart firewall)
Iv. Verification of VSFTPD
1. Execute sudo service vsftpd restart
Note: The first boot shutting down vsftpd is failed ignore,
Because this is a reboot command, ensure that the starting vsftpd is OK means the VSFTPD service is successfully started
2. Execute ifconfig View the IP address of the running VSFTPD server
3. In the browser input: IP address of the HTTP://VSFTPD server
4. Enter the FTP anonymous user account and password you created earlier
5. Seeing represents success
6. FTP client software (FileZilla, CuteFTP, viperftp) to connect the FTP server, file upload, download verification
V. Common commands
1. Start: sudo service vsftpd start
2. Off; sudo service vsftpd stop
3. Restart: sudo srvice vsftpd restart
Ftpserver Installation (window)
First, installation system environment
WINDOWS10 64-bit
Basic Configuration items:
1) local_root=/ftpfile (when local Users log in, will be replaced by the defined directory, the default value is the user's home directory)
2) anon_root=/ftpfile (use anonymous login, log in directory)
3) use_localtime=yes (default GMT time, change to use native system time)
4) Anonymous_enable=no (anonymous user is not allowed to log in)
5) Local_enable=yes (allow local users to log in)
6) Write_enable=yes (Local users can read and write in their own home directory)
7) local_umask=022 (umask value when local Users add files)
8) Dirmessage_enable=yes (if this option is enabled, the first time a user enters a directory, it checks if there is a. Message in the directory, if any, the contents of this file will appear, usually this file will be placed a welcome word, or a description of the directory. Default value is on)
9) Xferlog_enable=yes (whether upload/download logging is enabled). If enabled, the uploaded and downloaded information will be fully recorded in the file defined by Xferlog_file. The preset is on. )
Connect_from_port_20=yes (Specify FTP to use port 20 for data transfer with the default value YES)
One) Xferlog_std_format=yes (if enabled, the log file will be written in the standard format of Xferlog)
Ftpd_banner=welcome to Mmall FTP Server (used here to define a string of welcome words)
Chroot_local_user=no (used to specify whether users in the user list file are allowed to switch to the parent directory)
Chroot_list_enable=yes (Set whether the user list file specified by the Chroot_list_file configuration item is enabled)
Chroot_list_file=/etc/vsftpd/chroot_list (for specifying user list files)
Listen=yes (Setting the VSFTPD server to run in standalone mode is a good way to run in standalone mode, at which point the listen must be set to YES, which is the default value.) It is recommended not to change, there are many configuration commands related to the server run, need to be valid in this mode, if set to No, then VSFTPD is not run as a separate service, subject to the control of the XINETD service, the function will be limited.
PAM_SERVICE_NAME=VSFTPD (virtual user using Pam Authentication, here is the name of the set Pam, the default, and/etc/pam.d/vsftpd corresponding) Userlist_enable=yes ( Whether to enable Vsftpd.user_list file, blacklist, whitelist can be
PASV_MIN_PORT=61001 (passive mode uses the minimum port range)
pasv_max_port=62000 (passive mode uses the maximum port range)
Pasv_enable=yes (pasv_enable=yes/no (YES)
If set to Yes, the PASV operation mode is used, and if set to No, the port mode is used. The default value is Yes, which is to use the PASV operating mode.
The FTP protocol works in two ways: Port mode and PASV mode, Chinese meaning active and passive.
The port (Active) connection process is: The client sends a connection request to the server's FTP port (by default, 21), the server accepts the connection, and establishes a command link.
When the data needs to be transferred, the client tells the server with the Port command on the command link: "I opened the * * * port, you came to connect me." The server then sends a connection request from Port 20 to the client's * * * port, creating a data link to transmit the data.
Second, the PASV (passive) mode of the connection process is: the client to the server's FTP port (the default is 21) Send connection requests, the server accepts the connection, establish a command link.
When the data needs to be transferred, the server tells the client on the command link with the PASV command: "I opened the * * * port, you came to connect me." The client then sends a connection request to the server's * * * port and establishes a data link to transmit the data.
As can be seen from the above, the two ways of the command link connection method is the same, and the data link building method is completely different. And the complexity of FTP is that.
)
Vsftpd Installing and using the Linux system and the window System