In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
How to install ftp service on CVM? In view of this problem, this article introduces the corresponding analysis and answers in detail, hoping to help more partners who want to solve this problem to find a more simple and feasible way.
According to the sharing of IT note author Xiaoqi 2012, the vsftpd server supports virtual user accounts, and the use of virtual user accounts can provide a centrally managed FTP root directory, which facilitates the management of administrators. At the same time, the user name and password for FTP login are distinguished from the system user account, which further enhances the security of the FTP server.
Install vsftpd softwar
Use the command to check whether the vsftpd software is installed: rpm-qa | grep vsftpd
If it is not installed, execute the installation command: yum install vsftpd-y
Start the service
The use of vsftpd software mainly includes the following commands:
Start the ftp command service vsftpd start stop ftp command service vsftpd stop restart ftp command service vsftpd restart
Configuration of vsftpd
There are three main configuration files for ftp, located in the / etc/vsftpd/ directory, which are:
Ftpusers this file is used to specify which users cannot access the ftp server.
User_list the default account indicated by this file cannot access ftp by default
Vsftpd.conf vsftpd's main configuration file (related configuration instructions, self-Baidu)
Create a new virtual account
1. Prepare a password store file for the virtual user, which saves the user name and password that the user needs to enter when connecting to the FTP server. Files can be created by themselves, the file format is: odd behavior user name, even behavior password.
Password of vi vusers.txtitstyle// virtual user itstyleitstyle// virtual user itstyle
two。 Use the virtual user password library file just established to generate the authentication file of the FTP server, which is an encrypted ciphertext. After calling the corresponding authentication module, PAM will encrypt the user name and password sent from the FTP server, and then compare with the file to find a match before the login user will be allowed to log in.
Db_load-T-t hash-f vusers.txt / etc/vsftpd/vusers.db
Before running this command, don't forget to install the db4-utils package, which should include the db_load command, and so on.
3. To set up the PAM profile needed by the virtual user, because the FTP server will call PAM authentication after receiving the user name and password of the user, we also need to create the PAM profile of the virtual user.
Save the file in the / etc/pam.d directory, temporarily named vsftpd, which is the same as the option value of the pam_service_name=vsftpd option in the FTP service main configuration file (/ etc/vsftpd/vsftpd.conf). After you have created the file, add the following to the file:
Auth required / lib/security/pam_userdb.so db=/etc/vsftpd/vusersaccount required / lib/security/pam_userdb.so db=/etc/vsftpd/vusers
4. Since the user will be mapped to a local user after being authenticated by PAM, we also need to create a local user for the virtual user.
The useradd-d / home/ftpsite virtual / / user name is virtual, and the root chmod 700 / home/ftpsite / / of the home directory is FTP. Its permission is set to 700, which can be modified according to the actual situation.
5. In the main configuration file of FTP, enable FTP virtual users by adding the following options:
Guest_enable=YESguest_username=virtual / / maps a virtual user to a local user. Virtual is used here, and the user you just created. Pam _ service_name=/etc/vsftpd/vsftpd / / remember to change the value of this item.
6. This is the end of the configuration. Don't forget to restart the FTP service for testing.
This is the answer to the question on how to install ftp service on the CVM. I hope the above content can be of some help to you. If you still have a lot of questions to solve, you can follow the industry information channel for more related knowledge.
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.