In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
Editor to share with you how to use the vsFTPd server. I hope you will get something after reading this article. Let's discuss it together.
1. VsFTPd, commonly used FTP server suite at present
VsFTPd is the most respected FTP server program in the Linux distribution; it is characterized by compact, light, safe and easy to use; it can give full play to and master its own characteristics, but the most important thing is how to use it.
At present, the main FTPD suites commonly used in open source operating systems are ProFTPD, PureFTPd, wuftpd, etc. As to which FTP server suite is better, which one you are most familiar with, which one is *
2. Ftp user management commentary
FTP server manages users according to / etc/passwd and / etc/group by default, so we must understand the management of users and user groups in Linux system. The management of users and user groups is the basis of all applications. Some brothers do not want to understand the basic things, so they want to set up all kinds of servers in one step. Facts have proved that this learning method is the most unwise. Although you may have started the ftp server in a few minutes, you may not know what went wrong when you encounter a problem; so the basics are extremely important
Recommended article: "Overview of Linux user (user) and user Group (group) Management"
2.1. understanding of anonymous ftp users and user groups
When we visit the major FTP, we may not think about what identity we log in, if his FTP allows anonymous login; for example, we type in the browser
Ftp://mirrors.kernel.org
Or
Ftp://ftp:ftp@mirrors.kernel.org
We will find that the above two lines are eventually accessible, and the results shown are exactly the same, and eventually jump to the ftp://mirrors.kernel.org address; do we have a user and password when we access the FTP? Yes, it is also necessary, only anonymous access is allowed on the server side, and the user name and password of anonymous access are ftp, but we do not feel that he has a user name and password because of anonymous access. The second address is to access ftp://mirrors.kernel.org; with a ftp user and a password of ftp.
If we connect to mirrors.kernel.org with the ftp command, we will find that we need to enter the user ftp before the password ftp can be accessed
In the FTP server, the username and password of an anonymous user is 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
Description:
/ etc/passwd is the profile of the system user; / etc/group is the user group profile of the system. You can learn some basic knowledge of user management through "Overview of Linux user (user) and user Group (group) Management" and related documents.
In the ftp user line, we see seven fields, each separated by a: sign
Ftp is the user name
X is the password field and is hidden
14 is the user's UID field, which can be set by yourself. Do not be the same as the UID of other users, otherwise it will cause system security problems.
50 use the GID of the user group, you can set it yourself, do not share the GID of FTP with other user groups, otherwise it will cause the whole system problem.
FTP User is the user description field
/ var/ftp is the home directory of the ftp user, which can be defined by yourself
/ sbin/nologin this is the user login SHELL, which can also be defined. / sbin/nologin means that you cannot log in to the system; the system virtual account (also known as pseudo user) is generally set up this way. For example, we change the / sbin/nologin of the ftp user to / bin/bash so that the ftp user logs in to the system as a real user through a local or remote tool, ssh or telnet. This is not safe for the system; if you do not think it is necessary for a user to log in to the system, you can only give him permission to log on to his FTP account, that is, only give him permission to FTP, and do not set his SHELL to / bin/bash, etc.
Understanding of ftp user groups:
When we look at / etc/group, we will find a line like this
Ftp:x:50:
/ etc/group is the administrative profile of the user group. The above line indicates that the user group ftp,x is a password segment and 50 is GID;. We know that the ftp user belongs to the ftp user group against the ftp line in / etc/passwd, because the GID of the GID and ftp user groups in the ftp user line are the same.
2.2. Whether anonymous ftp users and ftp user groups can be deleted
In general, rows of ftp users and user groups cannot be deleted in / etc/passwd and / etc/group, because the FTP server requires them to manage FTP users, by default.
Although it cannot be deleted, some things related to ftp users and ftp users in / etc/passwd and / etc/group can be modified; for example, we can change the home directory of ftp users or the UID of ftp users. The premise is that you know something about user management, and system user management is one of the foundations of all applications. Brothers who are beginners in Linux may not understand the importance of user management, but you will find this truth slowly.
3. Installation of vsFTPd
There are vsFTPd packages in the installation disks of all major distributions, which can be installed with the package management tools provided by the corresponding distributions; of course, you can find vsftpd packages in the FTP images of major distributions; of course, you can also use the package management tools to install online; the vsftpd package is originally small, it won't take long, two minutes will be enough. Since this article is a beginner's tutorial, I highly recommend that you install it with the software provided by the distribution. It is not recommended that you compile the source code package yourself.
If you are using a Fedora or Redhat system, you can install it online with the following command
[root@localhost ~] # yum install vsftpd
If it is a debian system, you can use apt to install it online
[root@localhost ~] # apt-get install vsftpd
If you are a 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 downloaded 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
Then modify / etc/vsftpd.conf by adding the following line to the * * line of the configuration file
Listen=yes
Source package installation method, if your system is a RPM package management system, you can delete / etc/xinetd.d/vsftpd this file; then start the xinetd server
[root@localhost ~] # / etc/init.d/xinetd restart
Stop xinetd: [OK]
Start xinetd: [OK]
There are two modes of vsFTPd operation. In the review system of RPM package management, most of them are developed by Fedora/Redhat. For such systems, there is a xinted server; for non-RPM package management systems, there is generally no xinted. In order to ensure the unity of this document, we do not use xinetd mode, but use initd mode to start and manage the server, that is, stand-alone mode
After reading this article, I believe you have a certain understanding of "how to use vsFTPd server". If you want to know more about it, you are welcome to follow the industry information channel. Thank you for reading!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.