1. Before using the FTP service, you must install the required packages: FTP, lftp, and vsftpd.
2. Yum-y install FTP lftp (the yum repository is omitted here)
3. Yum-y install vsftpd (main configuration file:/etc/vsftpd. conf)
4. After the service is installed, we can use some users in/etc/passwd/. What do you find when lftp is locally deployed?
No! Why ???
Is The SELinux policy. We can adjust the bool value to allow normal users to log on to the home directory.
Setsebool-P ftp_home_dir 1
Through getsebool-A | grep FTP, you can see that the ftp_home_dir option is on, which means that my normal users can access their home directories. But it is not safe enough. I can return to the root (CD ..)
You only need to change the configuration file.
Vim/etc/vsftpd. conf
Just remove the comments starting with chroot_local_user = yes.
This article is from the "kingj" blog and will not be reproduced!