pasv_enable=YES
pasv_min_port=2202
pasv_max_port=2202
reverse_lookup_enable=NO
添加允许ftp远程访问的用户
# pwd
/etc/vsftpd
#ls
ftpusers vsftpd_conf_migrate.sh user_list vsftpd.conf
# cat user_list
# vsftpd userlist
# If userlist_deny=NO, only allow users in this file
# If userlist_deny=YES (default), never allow users in this file, and
# do not even prompt for a password.
# Note that the default vsftpd pam config also checks /etc/vsftpd/ftpusers
# for users that are denied.
ftpcest
ftpcest1
重启vsftpd服务
#systemctl restart vsftpd
centos7:本机测试
# ftp localhost 2201
Trying ::1...
ftp: connect to address ::1拒绝连接
Trying 127.0.0.1...
Connected to localhost (127.0.0.1).
220 (vsFTPd 3.0.2)
Name (localhost:root): ftpcest
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> ls
227 Entering Passive Mode (127,0,0,1,8,154).
150 Here comes the directory listing.
drwxrwxr-x 2 1003 1003 6 Apr 11 10:00 新文件夹
226 Directory send OK.
ftp>
windows客户端测试
比如:ftp://192.168.0.10:2201
参考网站和错误收集
vsftpd:500 OOPS: vsftpd: refusing to run with writable root inside chroot ()错误的解决方法