解决vsftpd 读取目录列表失败的问题
来源:互联网 发布:php中final 编辑:程序博客网 时间:2024/05/17 21:43
使用第三方FTP软件filezilla进行登陆,出现如下错误:
状态: 正在连接 192.168.1.6:21...
状态: 连接建立,等待欢迎消息...
响应: 220 (vsFTPd 2.2.2)
命令: USER ftp
响应: 331 Please specify the password.
命令: PASS ***
响应: 230 Login successful.
命令: SYST
响应: 215 UNIX Type: L8
命令: FEAT
响应: 211-Features:
响应: EPRT
响应: EPSV
响应: MDTM
响应: PASV
响应: REST STREAM
响应: SIZE
响应: TVFS
响应: UTF8
响应: 211 End
命令: OPTS UTF8 ON
响应: 200 Always in UTF8 mode.
状态: 已连接
状态: 读取目录列表...
命令: PWD
响应: 257 "/"
命令: TYPE I
响应: 200 Switching to Binary mode.
命令: PASV
响应: 227 Entering Passive Mode (192,168,1,6,23,8).
命令: LIST
错误: 连接超时
错误: 读取目录列表失败
该错误是由iptables的配置引起的,临时的解决方法是执行如下命令:
[root@localhost soft]# modprobe ip_nat_ftp
再次登陆列表正常啦!
但当你重新启动服务器则iptables规则失效,又会出现相同的情况,所以我们需要修改/etc/sysconfig/iptables-config文件,
[root@localhost soft]# vi /etc/sysconfig/iptables-config
# Load additional iptables modules (nat helpers)
# Default: -none-
# Space separated list of nat helpers (e.g. 'ip_nat_ftp ip_nat_irc'), which
# are loaded after the firewall rules are applied. Options for the helpers are
# stored in /etc/modprobe.conf.
IPTABLES_MODULES=""
# Unload modules on restart and stop
# Value: yes|no, default: yes
# This option has to be 'yes' to get to a sane state for a firewall
# restart or stop. Only set to 'no' if there are problems unloading netfilter
# modules.
IPTABLES_MODULES_UNLOAD="yes"
......
IPTABLES_MODULES_UNLOAD="yes"的意义:每次iptables停止或者重启都会Unload modules
IPTABLES_MODULES=""的意义:每次防火墙规则应用以后加载的模块
我们需要把
IPTABLES_MODULES=""
修改为:
IPTABLES_MODULES="ip_nat_ftp"
这样重启服务器之后就不必再每次都执行mobprobe啦。
状态: 正在连接 192.168.1.6:21...
状态: 连接建立,等待欢迎消息...
响应: 220 (vsFTPd 2.2.2)
命令: USER ftp
响应: 331 Please specify the password.
命令: PASS ***
响应: 230 Login successful.
命令: SYST
响应: 215 UNIX Type: L8
命令: FEAT
响应: 211-Features:
响应: EPRT
响应: EPSV
响应: MDTM
响应: PASV
响应: REST STREAM
响应: SIZE
响应: TVFS
响应: UTF8
响应: 211 End
命令: OPTS UTF8 ON
响应: 200 Always in UTF8 mode.
状态: 已连接
状态: 读取目录列表...
命令: PWD
响应: 257 "/"
命令: TYPE I
响应: 200 Switching to Binary mode.
命令: PASV
响应: 227 Entering Passive Mode (192,168,1,6,23,8).
命令: LIST
错误: 连接超时
错误: 读取目录列表失败
该错误是由iptables的配置引起的,临时的解决方法是执行如下命令:
[root@localhost soft]# modprobe ip_nat_ftp
再次登陆列表正常啦!
但当你重新启动服务器则iptables规则失效,又会出现相同的情况,所以我们需要修改/etc/sysconfig/iptables-config文件,
[root@localhost soft]# vi /etc/sysconfig/iptables-config
# Load additional iptables modules (nat helpers)
# Default: -none-
# Space separated list of nat helpers (e.g. 'ip_nat_ftp ip_nat_irc'), which
# are loaded after the firewall rules are applied. Options for the helpers are
# stored in /etc/modprobe.conf.
IPTABLES_MODULES=""
# Unload modules on restart and stop
# Value: yes|no, default: yes
# This option has to be 'yes' to get to a sane state for a firewall
# restart or stop. Only set to 'no' if there are problems unloading netfilter
# modules.
IPTABLES_MODULES_UNLOAD="yes"
......
IPTABLES_MODULES_UNLOAD="yes"的意义:每次iptables停止或者重启都会Unload modules
IPTABLES_MODULES=""的意义:每次防火墙规则应用以后加载的模块
我们需要把
IPTABLES_MODULES=""
修改为:
IPTABLES_MODULES="ip_nat_ftp"
这样重启服务器之后就不必再每次都执行mobprobe啦。
0 0
- 解决vsftpd 读取目录列表失败的问题
- 解决vsftpd 2.2.2读取目录列表失败的问题
- vsftpd 读取目录列表失败的问题
- pureftp读取目录列表失败解决
- FileZilla读取目录列表失败的解决办法
- ftp 读取目录列表失败
- FileZilla读取目录列表失败
- FileZilla读取目录列表失败的解决办法 ftp
- rcS文件读取失败问题的解决
- ftp连接:读取目录列表失败
- pureftp 读取目录列表失败解决办法
- ftp连接:读取目录列表失败
- javaweb_解决filezilla读取列表失败
- Android Studio 中使用assets目录读取失败的问题
- 【解决】APK下载到Cache目录安装失败的问题
- filezilla 响应:425 Can't open data connection.错误:读取目录列表失败的解决办法
- 解决DB2远程不能读取到数据库列表的问题
- centOS7,vsftpd,更改默认目录后nginx访问失败,403forbidden解决
- java.lang.AbstractMethodError: org.mybatis.spring.transaction.SpringManagedTransaction.getTimeout()L
- nginx反射代码做法
- iOS could not build module ‘UIKit’
- Spring Boot MyBatis 连接数据库
- springmvc中aop对controller切面编程
- 解决vsftpd 读取目录列表失败的问题
- 前缀、中缀、后缀表达式
- sdnuACM1011盒子与球
- point-wise ranking Vs pair-wise ranking
- ssh无密钥远程登录配置
- 第八周 谁是小偷
- tp以post方式提交表单并保存数据
- Spring Boot 多数据源
- hdu 5688 Problem D