You know what is Linux vsFTPD? This very advanced application technology will be explained by me very much. Where is Linux vsFTPDNB? I will introduce you to the unlimited field of Linux vsFTPD. Linux vsFTPD is a small and easy-to-use FTP server program. It is one of the most popular FTP server programs in the Linux release version. It features a small, lightweight, secure, and easy-to-use version.
Installation of Linux vsFTPD
The Linux vsFTPD software package is included in the latest installation disks of the major release editions, and can be installed using the software package management tool provided by the corresponding release editions. Of course, you can also find the Linux vsFTPD software package in the FTP images of various major releases and install it online using the software package management tool. We recommend that you use the software provided by the release version to install it. We do not recommend you compile the source code package by yourself. The Fedora or Redhat system can be installed online using the following command;
- [Root @ localhost ~] # Yum install vsftpd
- For debian systems, you can use apt for online installation;
- [Root @ localhost ~] # Apt-get install vsftpd
- For RPM systems, you can also find the vsftpd-xxxx.rpm package to install through the rpm command;
- [Root @ localhost ~] # Rpm-ivh vsftpd *. rpm
- Download and install the source code package
- [Root @ localhost ~] # Tar zxvf vsftpd-2.0.3.tar.gz
- [Root @ localhost ~] # Cd vsftpd-2.0.3
- [Root @ localhost ~] # Make; make install
- [Root @ localhost ~] # Cp vsftpd. conf/etc
- Modify/etc/vsftpd. conf and add the following line to the last line of the configuration file;Listen = yes
If your system is an RPM package-managed system, you can delete the/etc/xinetd. d/vsftpd file and start the xinetd server;
- [Root @ localhost ~] #/Etc/init. d/xinetd restart
- Stop xinetd: [OK]
- Start xinetd: [OK]
- Running vsFTPd Server
- [Root @ localhost ~] #/Usr/sbin/vsftpd &
- [Root @ localhost ~] #/Usr/local/sbin/vsftpd &
- Disable vsFTPd Server
Use pkill vsftpd to kill the Linux vsFTPD process. In this way, disable Linux vsFTPD and use psgrep vsftpd to view the process. If no process exists, it indicates that Linux vsFTPD has been disabled. Use the root permission.
- [Root @ localhost ~] # Pkill vsftpd
- [Root @ localhost ~] # Pgrep vsftpd
- Enable or disable the vsFTPd server in Fedora/Redhat/CentOS:
- In Fedora/Redhat/CentOS, you can also use the following method to start vsFTPd; of course, you also need to use the root permission;
- [Root @ localhost beinan] #/etc/init. d/vsftpd start
- Start vsftpd For vsftpd: [OK]
- Restart vsFTPd with the following command;
- [Root @ localhost beinan] #/etc/init. d/vsftpd restart
- Disable vsftpd: [OK]
- Start vsftpd For vsftpd: [OK]
- To disable the vsFTPd server, run the following command;
- [Root @ localhost beinan] #/etc/init. d/vsftpd stop
- Disable vsftpd: [OK]
Linux vsFTPD configuration file
Vsftpd. conf is the configuration file of the Linux vsFTPD server, which is usually/etc/vsftpd. conf or/etc/vsftpd. conf, vsftpd. the conf configuration file is the global control file of the Linux vsFTPD server. In this configuration file, each row should be regarded as a rule. After the configuration is complete, it must be restarted.
Configure virtual users in Linux vsFTPD
FTP users generally cannot log on to the system, which is also for security. In the system, users who do not have the permission to log on to the system are also known as virtual users. Virtual users also need to be written into/etc/passwd. This is just a virtual user method, but it is not really a virtual user, but the permission to log on to the SHELL is removed, so he is not able to log on to the system; if we want to locate the beinan user directory in the/opt/beinan directory and cannot log on to the system, we should perform the following operations.
- [Root @ localhost ~] # Adduser-d/opt/beinan-g ftp-s/sbin/nologin beinan
- [Root @ localhost ~] # Passwd beinan
- Changing password for user beinan.
- New password:
- Retype new password:
- Passwd: all authentication tokens updated successfully.
- [Root @ localhost ~] #
- In fact, this is not enough. We need to change the configuration file vsftpd. conf to ensure that the local virtual user has the read and write permissions;
-
- Local_enable=YES
- Write_enable=YES
- Local_umask=022
- How to implement a virtual path?
For example:
- /Home/a ing is ftp: // localhost/
- /Home/B/c is set to ftp: // localhost/c
- You can achieve this by using the following method.
- [Root @ localhost ~] # Mount-bind [original directory] [new directory]
- For example, if my default ftp directory is/var/ftp, I want to map the/mnt/LinG/WinSoft folder to the/var/ftp directory. I will perform the following operations:
Create a directory in the/var/ftp directory first.
- [Root @ localhost ~] # Mkdir/var/ftp/WinSoft
- Run the mount command.
- [Root @ localhost ~] # Mount-bind/mnt/LinG/WinSoft/var/ftp/WinSoft
- In this case, OK.
Enable the log function of the Linux vsFTPDv Server
Correct # In Front Of xferlog_file below, that is, enable the log function of vsftp, so that we can view vsftpd. log in the/var/log directory. This is the log function of vsFTP, which is extremely important for us. Xferlog_file =/var/log/vsftpd. log how can I limit the number of connections of the vsFTP server and the maximum number of connections for each IP address? Change the configuration file vsFTPD. conf of the Linux vsftpd server and add the following two lines:
- Max_clients= Number
- Max_per_ip= Number
- For example, I want to add up to 100 vsFTP connections and up to five connections for each IP address. Therefore, I should add the following two lines in vsftpd. conf:
- Max_clients=100
- Max_per_ip=5
- How can I limit the transmission speed?
- Anon_max_rate= Number
- Note: This is an anonymous speed.
- Local_max_rate= Number
- Note: This is the speed of local users on the vsFTP server.
- Note: The unit of this number is byte, so we need to calculate it.
- For example, if I want Anonymous Users and vsFTP users to download data at 80 KB, the number should be 1024 ×80=81920
- Therefore, we need to add the following two lines to vsftpd. conf:
- Anon_max_rate = 81920
Local_max_rate = 81920
- Linux vsftpd installation and startup, and logon under the command line, view Chinese file garbled
- Install and compile MySQL 5.1.34 extension library and Php Web server in Linux Nginx
- Linux MySQL program service built-in security mechanism
- Linux MYSQL command to modify the method of various connections
- Linux Oracle accesses MySQL Client software