Add in linux ftp users, and set the appropriate permissions, as follows:
1. Environment: ftp is vsftp. The user name is set to test. It is limited path / home / test
2. Create build user: root user:
# useradd -s /sbin/nologin test
# echo "111" | passwd --stdin test
3. Restrict users can only access the / home / test, you can not access other path
/Etc/vsftpd/vsftpd.conf modified as follows:
chroot_list_enable=YES
local_root=/var/www/html
# (default follows)
chroot_list_file=/etc/vsftpd/chroot_list
allow_writeable_chroot=yes
Vsftpd.chroot_list edit the file, restricted users added to it, each user name row
End change the configuration file and restart the vsftpd server
# echo test >> /etc/vsftpd/chroot_list
# systemctl restart vsftpd
5. If you need to allow users to change the password, but it does not telnet login system permissions:
# usermod -s /usr/bin/passwd test
6. If you want to delete a user, use the following codes:
# userdel -r test