FTP 问题 - VSFTPd 和从 FileZilla 连接

FTP 问题 - VSFTPd 和从 FileZilla 连接

我正在尝试连接到我在 EC2 上托管的 CentOS Linux 机器,我认为我已经正确配置了一切,但是当我尝试连接时,我收到了这一系列消息

Status: Connection established, waiting for welcome message...
Response: 220 (vsFTPd 2.0.5)
Command: USER tyndall Response: 331 Please specify the password.
Command: PASS *********
Response: 230 Login successful.
Status: Connected
Status: Retrieving directory listing...
Command: PWD
Response: 257 "/home/tyndall"
Command: TYPE I
Response: 200 Switching to Binary mode.
Command: PASV Error: Connection timed out Error: Failed to retrieve directory listing

不确定从哪里开始解决此问题。有什么想法吗?我需要更改任何权限吗?我认为这个 ID 有能力查看我自己的主目录。

我能够从在 Windows 上运行的 FTP 客户端的命令行版本推送/拉取文件。

答案1

我以前在我的其中一台服务器上解决过这个确切的问题;它是运行在 Windows Server 2008 和 EC2 上的 Filezilla 服务器。

解决方案:只需在 ftp 服务器上设置被动端口范围并在 EC2 安全组中打开相同范围即可。如果正在使用 iptables,您甚至可能需要在 CentOS 中将该范围添加到 IPTables 中——尽管您应该考虑关闭 iptables,因为它对于 EC2 安全组来说有点冗余。

请看这里:http://forum.filezilla-project.org/viewtopic.php?f=6&t=7315

[替代文字][1] [1]:http://www.iainlbc.com/wp-content/uploads/2011/01/security_groups.png

您还可以将 VSFTPd 配置为使用主动(而非被动)模式 - 因此它仅使用端口 20/21。主动和被动之间的区别解释如下:http://www.slacksite.com/other/ftp.html

相关内容