centos7,已经装好iptables,然后配置vsftpd如下:
local_root=/ftpfile
anon_root=/ftpfile
use_localtime=YES
anonymous_enable=NO
local_enable=YES
#
# Uncomment this to enable any form of FTP write command.
write_enable=YES
#
local_umask=022
dirmessage_enable=YES
#
# Activate logging of uploads/downloads.
xferlog_enable=YES
connect_from_port_20=YES
xferlog_std_format=YES
ftpd_banner=Welcome to mmall FTP Server
chroot_local_user=NO
chroot_list_enable=YES
# (default follows)
chroot_list_file=/etc/vsftpd/chroot_list
listen=YES
pam_service_name=vsftpd
userlist_enable=YES
#tcp_wrappers=YES
pasv_min_port=61001
pasv_max_port=62000
pasv_enable=YES
但启动的时候报错:
[root@centos-linux vsftpd]# systemctl status -l vsftpd.service
● vsftpd.service - Vsftpd ftp daemon
Loaded: loaded (/usr/lib/systemd/system/vsftpd.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since 一 2017-11-27 15:53:16 CST; 28s ago
Process: 21255 ExecStart=/usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf (code=exited, status=2)
11月 27 15:53:16 centos-linux.shared systemd[1]: Starting Vsftpd ftp daemon...
11月 27 15:53:16 centos-linux.shared systemd[1]: vsftpd.service: control process exited, code=exited status=2
11月 27 15:53:16 centos-linux.shared systemd[1]: Failed to start Vsftpd ftp daemon.
11月 27 15:53:16 centos-linux.shared systemd[1]: Unit vsftpd.service entered failed state.
11月 27 15:53:16 centos-linux.shared systemd[1]: vsftpd.service failed.