VsftpdIt is the most popular FTP server program in the Linux release version. It is very easy to use and I have spent a long time. Next I will introduce you to the vsftpd Learning Guide.
1. vsFTPd, commonly used FTP server suite;
VsFTPd is one of the most popular FTP server programs in the Linux release. It features little, light, and secure and easy to use. It can give full play to and master its own characteristics, however, the most important thing is to use it;
Currently, the FTPD suites commonly used in open-source operating systems mainly include ProFTPD, PureFTPd and wuftpd. Which FTP server suite is better, which one is the most familiar to you, and which one is the best;
2. ftp user management explanation;
The FTP server manages users based on/etc/passwd and/etc/group by default. Therefore, we must understand the management of Linux users and user groups, the management of users and user groups is the foundation of all applications. Some brothers don't want to understand the basic things and want to build various servers step by step. It turns out that this learning method is the smartest; although you may have started the ftp server in a few minutes, you may not be able to know what went wrong in case of problems. Therefore, the foundation is extremely important;
Recommended articles: Linux user and group management overview
2.1 anonymous ftp users and user groups;
When we access various major FTP sites, we may not think about the identity of us to log on, if his FTP allows anonymous login; for example, we enter in the browser;
Ftp://mirrors.kernel.org
Or
Ftp: // ftp: ftp@mirrors.kernel.org
We will find that the above two lines can finally access, and the display results are exactly the same, and eventually jump to the ftp://mirrors.kernel.org address; then when we access this FTP, is there a user and password? Yes, it is also necessary to allow anonymous access on the server side, while the username and password for anonymous access are all ftp, but we did not feel that the user name and password were used for anonymous access. The second address is the ftp user, the password is also ftp to access the ftp://mirrors.kernel.org;
If we use the ftp command to connect to mirrors.kernel.org, we will find that we need to enter the user ftp and password ftp to access;
On the FTP server, the anonymous user name and password are both ftp. This user can be found in/etc/passwd in your operating system. There may be a line similar to the following;
Ftp: x: 14: 50: FTP User:/var/ftp:/sbin/nologin
Note:
/Etc/passwd is the configuration file of the System user./etc/group is the configuration file of the System user group) management overview and related documents to learn some basic user management knowledge;
In the ftp user line, we can see seven fields, each of which is separated by a number;
Ftp is the user name
X is the password field, which is hidden;
14 is the UID field of the user. You can set it by yourself. Do not use the same UID as other users. Otherwise, system security problems may occur;
50 use the GID of the user group, which can be set by yourself. Do not share the ftp gid with other user groups; otherwise, the system will be completely faulty;
FTP User is a User Description field;
/Var/ftp is the home directory of ftp users and can be defined by yourself;
/Sbin/nologin this is the user login SHELL, which can also be defined,/sbin/nologin indicates that the system cannot be logged on; system virtual accounts (also known as pseudo users) are generally set in this way. For example, change the ftp user/sbin/nologin to/bin/bash, so that the ftp user can log on to the system as a real user through local or remote tools ssh or telnet. This is not safe for the system. If you think that a user does not have to log on to the system, you can grant only the FTP account permissions, that is, only the FTP permissions to the user, instead of setting his SHELL to/bin/bash;
Understanding of the ftp user group:
When we look at/etc/group, we will find such a line;
Ftp: x: 50:
/Etc/group is the management configuration file of the user group. The above line indicates the user group ftp, x indicates the password segment, and 50 indicates the GID; we know from the ftp line in/etc/passwd that the ftp user belongs to the ftp user group, because the GID in the ftp user row is the same as the GID in the ftp user group;
2.2 can anonymous ftp users and ftp user groups be deleted?
In general, you cannot delete ftp users and user group rows in/etc/passwd and/etc/group, because the FTP server requires them to manage FTP users, by default.
Although it cannot be deleted, some related ftp users and ftp user groups in/etc/passwd and/etc/group can be modified; for example, you can change the Home Directory of an ftp user, or change the UID of an ftp user ...... the premise is that you understand user management. system user management is one of the foundations of all applications. Maybe new Linux beginners do not understand the importance of user management, but you will find this truth slowly;
3. Install vsFTPd;
VsFTPd software packages are included in the latest installation disks of various major release editions. you can install them using the software package management tools provided by the corresponding release editions; of course, you can find the vsftpd software package in the FTP images of various major releases; of course, you can also use the software package management tool to install it online; the vsftpd software package is not big, and it will not take long, two minutes is enough. This is a beginner's tutorial. I strongly 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;
If you are using a Fedora or Redhat system, you can use the following command to install it online;
[Root @ localhost ~] # Yum install vsftpd
For debian systems, you can use apt for online installation;
[Root @ localhost ~] # Apt-get install vsftpd
If you are an RPM system, you can also find the vsftpd-xxxx.rpm package to install through the rpm command;
[Root @ localhost ~] # Rpm-ivh vsftpd *. rpm
You can download the source package to install
For example, we download the vsftpd-2.0.3.tar.gz;
[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]
VsFTPd runs in two modes. In RPM package management systems, most of them are developed by Fedora/Redhat. For such systems, there is an xinted server; for non-RPM package management systems, there is generally no xinted. To ensure the consistency of this document, we should not use the xinetd mode, but use the initd running mode to start and manage the server, that is, the independent running mode. What is the xinted and inted modes, you can refer to "use vsFTPd to install a server on a Linux Network"
Through the above introduction, I believe that those beginners know the basic knowledge of vsFTPd and hope to help you!
- How to add Vsftpd virtual users
- Install vsFTPd in one minute
- How to enable and disable the vsFTPd Server
- Anonymous upload/download of common vsFTPd Server Functions
- Read and Write Permissions for common vsFTPd Functions
- Common vsFTPd functions: Setting virtual paths and viewing log information