Linux 解決 vsftpd 讀取目錄列表失敗的問題。


今天,給Linux裝一個 vsftpd 。

使用第三方 FTP軟件 filezilla 進行登陸,出現如下錯誤:

   

 

 圖沒了,自己做了一個 將就看吧。 

至於什么原因,我也沒有深入研究。這里直接說 百度出來,能解決的辦法:

該錯誤是由 iptables 的配置引起的,臨時的解決方法是執行如下命令:

[root@localhost ~]# modprobe ip_nat_ftp

 再次登陸列表正常啦!

但當你重新啟動服務器則 iptables規則 失效,又會出現相同的情況,所以我們需要修改 /etc/sysconfig/iptables-config 文件,

[root@localhost ~]# 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啦。

 

 

by 不言謝


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM