為什麼我在 IIS 中看不到 FTP 站台的目錄清單?

為什麼我在 IIS 中看不到 FTP 站台的目錄清單?

我建立了一個 FTP 網站。我將匿名訪問設為 true,並啟用了匿名身份驗證。

我使用伺服器上的 Windows 資源管理器對其進行了檢查,並且可以使用以下位址查看我的目錄清單:

ftp://host:port/
ftp://ip:port/

但是,我在 FileZilla 中看不到 FTP 的內容。這是日誌:

Status: Resolving address of DOMAIN
Status: Connecting to IP:PORT...
Status: Connection established, waiting for welcome message...
Status: Insecure server, it does not support FTP over TLS.
Status: Logged in
Status: Retrieving directory listing...
Command:    PWD
Response:   257 "/" is current directory.
Command:    TYPE I
Response:   200 Type set to I.
Command:    PASV
Response:   227 Entering Passive Mode (...).
Command:    LIST
Response:   150 Opening BINARY mode data connection.
Error:  Connection timed out after 20 seconds of inactivity
Error:  Failed to retrieve directory listing
Status: Disconnected from server
Status: Resolving address of DOMAIN
Status: Connecting to IP:PORT...
Status: Connection established, waiting for welcome message...
Status: Insecure server, it does not support FTP over TLS.
Status: Logged in
Status: Retrieving directory listing...
Command:    PWD
Response:   257 "/" is current directory.
Command:    TYPE I
Response:   200 Type set to I.
Command:    PASV
Response:   227 Entering Passive Mode (...).
Command:    LIST
Response:   150 Opening BINARY mode data connection.
Error:  Connection timed out after 20 seconds of inactivity
Error:  Failed to retrieve directory listing

我被困在這一點上。怎麼了?

我使用 Windows Server 2012 R2 和 IIS 8。

更新:這是 FileZilla 在活動模式的日誌:

Status: Disconnected from server
Status: Resolving address of DOMAIN
Status: Connecting to IP:PORT...
Status: Connection established, waiting for welcome message...
Status: Insecure server, it does not support FTP over TLS.
Status: Logged in
Status: Retrieving directory listing...
Command:    PWD
Response:   257 "/" is current directory.
Command:    TYPE I
Response:   200 Type set to I.
Command:    PORT 62,102,140,42,195,248
Response:   200 PORT command successful.
Command:    LIST
Response:   150 Opening BINARY mode data connection.
Error:  Connection timed out after 20 seconds of inactivity
Error:  Failed to retrieve directory listing
Status: Disconnected from server
Status: Resolving address of DOMAIN
Status: Connecting to IP:PORT...
Status: Connection established, waiting for welcome message...
Status: Insecure server, it does not support FTP over TLS.
Status: Logged in
Status: Retrieving directory listing...
Command:    PWD
Response:   257 "/" is current directory.
Command:    TYPE I
Response:   200 Type set to I.
Command:    PORT 62,102,140,42,196,4
Response:   200 PORT command successful.
Command:    LIST
Response:   150 Opening BINARY mode data connection.
Error:  Connection timed out after 20 seconds of inactivity
Error:  Failed to retrieve directory listing

更新2:我在活動模式下使用Beyond Compare,日誌如下:

Stat> Connected.
Recv> 220 Microsoft FTP Service
Sent> USER anonymous
Recv> 331 Anonymous access allowed, send identity (e-mail name) as password.
Sent> PASS ********
Recv> 230 User logged in.
Sent> FEAT
Recv> 211-Extended features supported:
Recv>  LANG EN*
       UTF8
Recv>  AUTH TLS;TLS-C;SSL;TLS-P;
       PBSZ
       PROT C;P;
       CCC
Recv>  HOST
Recv>  SIZE
       MDTM
       REST STREAM
      211 END
Sent> OPTS UTF8 ON
Recv> 200 OPTS UTF8 command successful - UTF8 encoding now ON.
Sent> TYPE A
Recv> 200 Type set to A.
Sent> SYST
Recv> 215 Windows_NT
Sent> TYPE A
Recv> 200 Type set to A.
Sent> PWD
Recv> 257 "/" is current directory.
Sent> REST 1
Recv> 350 Restarting at 1.
Sent> REST 0
Recv> 350 Restarting at 0.
Sent> PORT 192,168,1,158,23,116
Recv> 501 Server cannot accept argument.
Unable to load ftp://host:port/: Server cannot accept argument.

答案1

看起來您正在嘗試以被動模式使用 FileZilla,但您的伺服器可能不支援它或透過防火牆阻止連接埠存取。由於您可以在活動模式下使用瀏覽器存取文件,因此請將 FileZilla 設為活動模式並重試。

相關內容