4. Edit the vi /etc/vsftpd/vsftpd.conf file, press i to edit, change anonymous_enable=yes to no, and add after it: user_config_dir=/etc/vsftpd chroot_list_enable=YES chroot_list_file=/etc /vsftpd/chroot_list xferlog_file=/var/www/logs/vsftpd.log ftpd_banner=welcome to flashgou vsftpd. max_clients=4 max_per_ip=2 use_localtime=YES Press esc, then :wq to exit. 5. Create the file vi /etc/vsftpd/chroot_list and add ftpflashgou user
To configure.
1. yum -y install vsftpd.i*
2. Add user group groupadd wwwroot
Add user useradd -g wwwroot -M -d /var/www -s /sbin/nologin ftpflashgou
Set password passwd ftpflashgou
3. Create folder:
mkdir /var/www
mkdir /var/www/logs
4. Edit the vi /etc/vsftpd/vsftpd.conf file, press i to edit, change anonymous_enable=yes to no, and add after it:
user_config_dir=/etc/vsftpd
chroot_list_enable=YES
chroot_list_file=/etc /vsftpd/chroot_list
xferlog_file=/var/www/logs/vsftpd.log
ftpd_banner=welcome to flashgou vsftpd.
max_clients=4
max_per_ip=2
use_localtime=YES
Press esc, then :wq to exit.
5. Create the file vi /etc/vsftpd/chroot_list and add ftpflashgou user
6. Permissions, enter directly: chown -R ftpflashgou.wwwroot /var/www
chmod -R 755 /var/www
Finally just restart linux, why. . . I always thought that Linux doesn’t need to be restarted