为什么我在 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 和 Active Mode,以下是日志:

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 设置为主动模式并重试。

相关内容