Linux

FTP 問題 - VSFTPd 並從 FileZilla 連接

  • February 16, 2016

我正在嘗試連接到我在 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 客戶端的命令行版本推送/拉取文件。

我過去在我的一台伺服器上解決了這個確切的問題;它是 Windows Server 2008 上的 Filezilla 伺服器,也在 EC2 上。

解決方案:這是在 ftp 伺服器上設置被動埠範圍並在 EC2 安全組中打開相同範圍的問題。如果正在使用 iptables,您甚至可能需要將範圍添加到 CentOS 中的 IPTables —— 儘管您應該考慮關閉 iptables,因為它對於 EC2 安全組來說有點多餘。

看看這裡: http: //forum.filezilla-project.org/viewtopic.php?f=6 &t=7315

$$ alt text $$$$ 1 $$ $$ 1 $$: http://www.iainlbc.com/wp-content/uploads/2011/01/security_groups.png 您還可以將 VSFTPd 配置為使用主動(非被動)模式 - 因此它僅使用埠 20/21。這裡解釋了主動和被動之間的區別:http ://www.slacksite.com/other/ftp.html

引用自:https://serverfault.com/questions/222340