After configuring the yum source, install it as follows
[root@localhost mnt]# yum list vsftpd
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
Available Packages
vsftpd.x86_64 2.2.2-11.el6_4.1
[root@localhost mnt] # yum install vsftpd.x86_64
......
edit configuration file vsftpd.conf
[root@localhost mnt]# cd /etc/vsftpd/
[root@localhost vsftpd]# cp vsftpd.conf vsftpd.conf.bak
[root@localhost vsftpd]# vim vsftpd.conf
do the following configuration:
"#anonymous_enable=YES" Change to "anonymous_enable=NO"
Add at the end of the file: userlist_deny=NO
Description: Only users in userlist are allowed to access the ftp server
Create an ftp user
[root@localhost vsftpd]# useradd testacc
[root@localhost vsftpd]# passwd testacc
Changing password for user testacc.
New password:
BAD PASSWORD: it is too simplistic/systematic
Retype new password:
passwd: all authentication tokens updated successfully.
[root@localhost vsftpd]# echo testacc >> /etc/vsftpd/user_list
说明:也可以通过编辑配置文件user_list,在文件末尾新增添加的用户
在/etc/vsftpd/vsftpd.conf 里添加:
chroot_list_enable=YES //使用户不能离开主目录
chroot_list_file=/etc/vsftpd/chroot_list重启ftp服务器
然后在 /etc/vsftpd/chroot_list里添加ftpuser,每个一行。
类似如下:
ftpusr1
ftpusr2
...
/etc/vsftpd/userlist 里添加:
ftpusr1
ftpusr2
...
[root@localhost vsftpd]# service vsftpd restart
Beijing java job search group 145471323
Centos 7 installation and configuration vsftpd
Guess you like
Origin http://43.154.161.224:23101/article/api/json?id=326150137&siteId=291194637
Recommended
Ranking