–
1. Create a new user "test1"
- Create a new user "test1" and set the user directory to "/usr/testDir/"
- Set the login password for user "test1"
[root ~]# useradd -d /usr/testDir/ test1
[root ~]# passwd test1
更改用户 test1 的密码 。
新的 密码:
passwd:所有的身份验证令牌已经成功更新。
[root ~]#
–
2. Open the "/etc/vsftpd/vsftpd.conf" file and set the following parameters
chroot_local_user=YES
pam_service_name=vsftpd
userlist_enable=YES
userlist_file=/etc/vsftpd/user_list
userlist_deny=NO
allow_writeable_chroot=YES
pasv_min_port=30000
pasv_max_port=31000
–
3. Navigate to "/etc/vsftpd/", open the "user_list" file, and add user "test1"
–
4. Restart the ftp service
[root ~]# systemctl restart vsftpd
–
5. Use ftp client software to access the ftp server
–
6. Upload files to the ftp server to change the directory (it will fail!!!)
Failed to upload file (response : 553 Could not create file .)
Reason: The current ftp operation user does not have write permission for the folder on the remote server! ! ! ! Need to modify the folder operation permissions of the current user in the liunx system
–