FTP常见错误及解决方案

227 Entering Passive Mode

1
2
3
4
响应: 227 Entering Passive Mode (192,168,1,16,221,111).
命令: LIST
错误: 连接超时
错误: 读取目录列表失败

解决方法:

  1. 打开/etc/vsftpd/vsftpd.conf在最后面加入如下:
1
2
pasv_min_port=1
pasv_max_port=30999
  1. 在iptable防火墙规则中加入如下规则:
    打开/etc/sysconfig/iptables加入如下:
1
-A INPUT -m state –state NEW -m tcp -p tcp –dport 1:30999 -j ACCEPT
  1. 重启vsftp和iptables服务了。
    • 重启vsftp服务service vsftpd restart
    • 重启iptables服务service iptables restart