Vsftpd server configuration
Step1: create a ftp user name
# useradd-s / sbin/nologin-d / home/ftp-g ftp ftpadmin
Step2: configure password for ftp user
Passwd ftpadmin
Step3: modify permissions for the ftp directory
Chmod-R 777 / home/ftp
Chgrp-R ftp / home/ftp
Step4:vsftpd.conf configuration
Anonymous_enable=NO
Chroot_local_user=YES
(this is the switch that allows users to access the parent directory of the home directory. When set to YES, manually create the / etc/vsftpd/chroot_list file and write in the ftp user name, then FTP users can only access their own directory;)
Chroot_list_enable=YES
Chroot_list_file=/etc/vsftpd/chroot_list