1.安装:
yum install -y vsftpd
2.创建用户
useradd virftp -s /sbin/nologin
3.创建虚拟用户及其存放路径
vim /etc/vsftpd/vsftpd_login
chmod 600 /etc/vsftpd/vsftpd_login
4.生成能够识别的库文件
db_load -T -t hash -f /etc/vsftpd/vsftpd_login /etc/vsftpd/vsftpd_login.db
5.创建虚拟账号
mkdir /etc/vsftpd/vsftpd_user_conf
cd /etc/vsftpd/vsftpd_user_conf
vim test1
[root@test2 vsftpd_user_conf]# vim test1
local_root=/home/virftp/test1
anonymous_enable=NO
write_enable=YES
local_umask=022
anon_upload_enable=NO
anon_mkdir_write_enable=NO
idle_session_timeout=600
data_connection_timeout=120
max_clients=10
max_per_ip=5
local_max_rate=50000
6.创建其家目录
mkdir /home/virftp/test1
chown -R virftp:virftp /home/virftp/test1
7.编辑认证文件
vim /etc/pam.d/vsftpd
auth sufficient /lib64/security/pam_userdb.so db=/etc/vsftpd/vsftpd_login
account sufficient /lib64/security/pam_userdb.so db=/etc/vsftpd/vsftpd_login
ls /lib64/security/pam_userdb.so
注:这里主机是64位的话就是/lib64,不然就是/lib
8.编辑vsftp的配置文件
vim /etc/vsftpd/vsftpd.conf
guest_enable=YES
guest_username=virftp
virtual_use_local_privs=YES
user_config_dir=/etc/vsftpd/vsftpd_user_conf
9.重启、执行
/etc/init.d/vsftpd restart
cd /home/virftp/test1/
touch 2.txt
mkdir 123
lftptest1@127.0.0.1
FTP协议详解与vsftpd在Linux上的安装配置 http://www.linuxidc.com/Linux/2016-09/134831.htm
玩转vsftpd服务器的四大高级配置:http://www.linuxidc.com/Linux/2013-09/90565.htm
vsFTPd配置教程:http://www.linuxidc.com/Linux/2013-09/90562.htm
Ubuntu实用简单的FTP架设 http://www.linuxidc.com/Linux/2012-02/55346.htm
Ubuntu 上架设FTP服务器和Apache服务器 http://www.linuxidc.com/Linux/2011-04/35295.htm
Ubuntu 13.04 安装 LAMP\vsftpd\Webmin\phpMyAdmin 服务及设置 http://www.linuxidc.com/Linux/2013-06/86250.htm
RHEL6平台下SeLinux和vsftpd的匿名上传的简单案例 http://www.linuxidc.com/Linux/2013-04/82300.htm
Linux系统vsftpd源码安装 http://www.linuxidc.com/Linux/2013-03/81475.htm
CentOS 7上启动 vsftp报错解决一例 http://www.linuxidc.com/Linux/2017-02/140343.htm
openSUSE 13.2/13.1 下安装配置 FTP服务器 vsftpd http://www.linuxidc.com/Linux/2014-12/110070.htm
CentOS7基于虚拟用户的vsftpd http://www.linuxidc.com/Linux/2016-11/137150.htm