Although secur CRT can use RZ to transfer files in Linux, we still need to learn how
In Linux, FTP is configured. This article explains how to use vsftpd to make a summary.
1. Install vsftpd. rpm
Rpm-uvh vsftpd. RMP
2. Install the DB Toolkit
Rpm-uvh db4-utils.rpm
3. Create two folders:/usr/local/FTP/home1 and/usr/local/FTP/home2.
4. Create two ftpuser1 and ftpuser2 users and disable them from logging on to the shell. They are only used for FTP login.
Useradd-D/usr/local/FTP/home1-S/sbin/nologin ftpuser1
Chown ftpuser1/usr/local/FTP/home1-R
Chmod 777/usr/local/FTP/home1-R
Similarly, set ftpuser2 as follows:
5. Set the password for ftpuser1 and ftpuser2, set the FTP user list, singular behavior account, and even behavior password:
CD/etc/vsftpd
VI vuser.txt
Ftpuser1
123456
Ftpuser2
123456
6. Use db_load to create a user database
Db_load-T-t hash-F/etc/vsftpd/vusers.txt/etc/vsftpd/vusers. DB
Chmod 600 vusers .*
7. Create the PAM Configuration File required by the FTP user
VI/etc/PAM. d/vsftpd. Pam
Auth required/lib/security/pam_userdb.so.db =/etc/vsftpd/vusers
Account required/lib/security/pam_userdb.so.db =/etc/vsftpd/vusers
8. Add the FTP user account to the FTP permission list
VI/etc/vsfftpd/user_list
Ftpuser1
Ftpuser2
9. Create an FTP user folder to store the configuration files of each user.
Mkdir/etc/vsftpd/vuser_conf
10 configure the configuration files for each user, as shown in figure
VI ftpuser1
Annon_world_readable_only = No enable browsing by other users
Write_enable = yes. The User Write Permission is enabled.
Anon_upload_enable = Yes
Anon_mkdir_write_enable = Yes
Anon_other_write_enable = Yes permissions that can be deleted by anonymous accounts
Local_root =/usr/local/FTP/home1 specify the directories that the current user can only access
11. Remove the comment lines in the default vsftpd. conf configuration file of the backup system.
CD/etc/vsftpd
CP vstpd. conf vsftpd. conf. Bak
Grep-V ^ # vsftpd. conf. Bak> vsftpd. conf
12 configure vsftp. conf
Anonymous_enable = No
Local_enable = Yes
Write_enable = Yes
Local_umask = 022 (022 indicates that the directory permission is 755)
Dirmessage_enable = Yes
........
Pam_service_name = vsftpd. Pam vsftpd verification file
Userlist_enable = Yes
Userlist_deny = No
User_config_dir =/etc/vsftpd/vuser_conf
Chroot_local_user = yes is restricted to the user's own directory
13 restart the service
Service vsftpd restart