vsftpd - 拳不离手、曲不离口 - Speak with your code, my friend, not your word.
Centos

vsftpd

clem posted @ 2012年4月02日 20:42 in Application with tags ftp Server vsftpd 服务器 , 2047 阅读

简介:linux下常用的ftp服务器。

足迹:

1,安装并配置vsftpd,使得局域网内的其他电脑可以通过(z1)(z2)(z3)(z4)

 

障碍:

z1:如何安装

参考http://www.noob2geek.com/linux/setup-vsftpd-debian-ubuntu/

z2:ftp的目录是什么?

 

# cat /etc/passwd | grep ftp

 

通常是/var/ftp

z3: 碰到LIST Error: Connection timed out Error: Failed to retrieve directory listing

没有开启VSFTPD 的 Passive Mode。

 

/etc/vsftpd/vsftpd.conf
未尾添加:
pasv_enable=YES
pasv_min_port=40000
pasv_max_port=40080
pasv_promiscuous=YES

/etc/sysconfig/iptables
加入:
-A RH-Firewall-1-INPUT -m state –state NEW -m tcp -p tcp –dport 21 -j ACCEPT
-A RH-Firewall-1-INPUT -m state –state NEW -m tcp -p tcp –dport 40000:40080 -j ACCEPT

重启iptables & vsftpd,就可以使用pasv模式了。

关于passive mode,参考http://jackiechen.blog.51cto.com/196075/193883

z4:出现226 Transfer done (but failed to open directory).

selinux引起的,除非你有明确的需求要用selinux或者闲得蛋疼,否则装完centos后的第一件事就是把selinux给disabled掉。参考http://www.thegeekstuff.com/2009/06/how-to-disable-selinux-redhat-fedora-debian-unix/


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter