FTP 目录列表在 Cyber​​duck 和 FileZilla 中失败,但在命令行上可以运行

FTP 目录列表在 Cyber​​duck 和 FileZilla 中失败,但在命令行上可以运行

我正在尝试使用我的 Mac(运行 OS X 10.10)连接到 FTP 服务器(在 Windows 7 上运行 FileZilla 0.9.56b)。根据 FileZilla Server 文档,该服务器直接连接到互联网,并配置为允许被动模式端口通过 Windows 防火墙。

我尝试连接 Cyber​​duck 版本 4.8.3 (19083) 和 FileZilla 3.16.0,连接本身可以正常工作,但目录列表总是失败。

有趣的是,通过命令行ftp客户端,它可以工作:

  % ftp [email protected]                                                                                                                             !4861
Connected to xxx.xxx.xxx.xxx.
220-FileZilla Server 0.9.56 beta
220-written by Tim Kosse ([email protected])
220 Please visit https://filezilla-project.org/
331 Password required for user
Password:
230 Logged on
Remote system type is UNIX.
ftp> ls
229 Entering Extended Passive Mode (|||50076|)
150 Opening data channel for directory listing of "/"
-rw-r--r-- 1 ftp ftp           6148 Jan 21  2016 .DS_Store
drwxr-xr-x 1 ftp ftp              0 Feb 22 16:52 Data
226 Successfully transferred "/"

在 FileZilla 上,我得到了以下信息:

Status:         Disconnected from server
Status:         Connecting to xxx.xxx.xxx.xxx:21...
Status:         Connection established, waiting for welcome message...
Status:         Initializing TLS...
Status:         Verifying certificate...
Status:         TLS connection established.
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 (xxx,xxx,xxx,xxx,195,141)
Command:    MLSD
Response:   425 Can't open data connection for transfer of "/"
Error:          Failed to retrieve directory listing

它会等待一段时间,直到显示“目录列表失败”。Cyber​​duck 上的情况类似。

这里可能存在什么问题?在线 FTP 测试器还报告我的服务器正在运行。

以下是失败连接的服务器日志:

(000004)3/11/2016 16:43:42 PM - (not logged in) (141.241.26.7)> Connected on port 21, sending welcome message...
(000004)3/11/2016 16:43:42 PM - (not logged in) (141.241.26.7)> 220-FileZilla Server 0.9.56 beta
(000004)3/11/2016 16:43:42 PM - (not logged in) (141.241.26.7)> 220-written by Tim Kosse ([email protected])
(000004)3/11/2016 16:43:42 PM - (not logged in) (141.241.26.7)> 220 Please visit https://filezilla-project.org/
(000004)3/11/2016 16:43:42 PM - (not logged in) (141.241.26.7)> AUTH TLS
(000004)3/11/2016 16:43:42 PM - (not logged in) (141.241.26.7)> 234 Using authentication type TLS
(000004)3/11/2016 16:43:42 PM - (not logged in) (141.241.26.7)> SSL connection established
(000004)3/11/2016 16:43:44 PM - (not logged in) (141.241.26.7)> USER user
(000004)3/11/2016 16:43:44 PM - (not logged in) (141.241.26.7)> 331 Password required for user
(000004)3/11/2016 16:43:44 PM - (not logged in) (141.241.26.7)> PASS *********
(000004)3/11/2016 16:43:44 PM - user (141.241.26.7)> 230 Logged on
(000004)3/11/2016 16:43:44 PM - user (141.241.26.7)> SYST
(000004)3/11/2016 16:43:44 PM - user (141.241.26.7)> 215 UNIX emulated by FileZilla
(000004)3/11/2016 16:43:44 PM - user (141.241.26.7)> FEAT
(000004)3/11/2016 16:43:44 PM - user (141.241.26.7)> 211-Features:
(000004)3/11/2016 16:43:44 PM - user (141.241.26.7)>  MDTM
(000004)3/11/2016 16:43:44 PM - user (141.241.26.7)>  REST STREAM
(000004)3/11/2016 16:43:44 PM - user (141.241.26.7)>  SIZE
(000004)3/11/2016 16:43:44 PM - user (141.241.26.7)>  MLST type*;size*;modify*;
(000004)3/11/2016 16:43:44 PM - user (141.241.26.7)>  MLSD
(000004)3/11/2016 16:43:44 PM - user (141.241.26.7)>  AUTH SSL
(000004)3/11/2016 16:43:44 PM - user (141.241.26.7)>  AUTH TLS
(000004)3/11/2016 16:43:44 PM - user (141.241.26.7)>  PROT
(000004)3/11/2016 16:43:44 PM - user (141.241.26.7)>  PBSZ
(000004)3/11/2016 16:43:44 PM - user (141.241.26.7)>  UTF8
(000004)3/11/2016 16:43:44 PM - user (141.241.26.7)>  CLNT
(000004)3/11/2016 16:43:44 PM - user (141.241.26.7)>  MFMT
(000004)3/11/2016 16:43:44 PM - user (141.241.26.7)>  EPSV
(000004)3/11/2016 16:43:44 PM - user (141.241.26.7)>  EPRT
(000004)3/11/2016 16:43:44 PM - user (141.241.26.7)> 211 End
(000004)3/11/2016 16:43:44 PM - user (141.241.26.7)> PBSZ 0
(000004)3/11/2016 16:43:44 PM - user (141.241.26.7)> 200 PBSZ=0
(000004)3/11/2016 16:43:44 PM - user (141.241.26.7)> PROT P
(000004)3/11/2016 16:43:44 PM - user (141.241.26.7)> 200 Protection level set to P
(000004)3/11/2016 16:43:44 PM - user (141.241.26.7)> PWD
(000004)3/11/2016 16:43:44 PM - user (141.241.26.7)> 257 "/" is current directory.
(000004)3/11/2016 16:43:44 PM - user (141.241.26.7)> TYPE I
(000004)3/11/2016 16:43:44 PM - user (141.241.26.7)> 200 Type set to I
(000004)3/11/2016 16:43:44 PM - user (141.241.26.7)> PASV
(000004)3/11/2016 16:43:44 PM - user (141.241.26.7)> 227 Entering Passive Mode (xxx,xxx,xxx,xxx,199,23)
(000004)3/11/2016 16:43:44 PM - user (141.241.26.7)> MLSD
(000004)3/11/2016 16:43:54 PM - user (141.241.26.7)> 425 Can't open data connection for transfer of "/"

这是有效的:

(000005)3/11/2016 16:46:55 PM - (not logged in) (141.241.26.7)> Connected on port 21, sending welcome message...
(000005)3/11/2016 16:46:55 PM - (not logged in) (141.241.26.7)> 220-FileZilla Server 0.9.56 beta
(000005)3/11/2016 16:46:55 PM - (not logged in) (141.241.26.7)> 220-written by Tim Kosse ([email protected])
(000005)3/11/2016 16:46:55 PM - (not logged in) (141.241.26.7)> 220 Please visit https://filezilla-project.org/
(000005)3/11/2016 16:46:55 PM - (not logged in) (141.241.26.7)> USER user
(000005)3/11/2016 16:46:55 PM - (not logged in) (141.241.26.7)> 331 Password required for user
(000005)3/11/2016 16:47:01 PM - (not logged in) (141.241.26.7)> PASS *********
(000005)3/11/2016 16:47:01 PM - user (141.241.26.7)> 230 Logged on
(000005)3/11/2016 16:47:01 PM - user (141.241.26.7)> SYST
(000005)3/11/2016 16:47:01 PM - user (141.241.26.7)> 215 UNIX emulated by FileZilla
(000005)3/11/2016 16:47:01 PM - user (141.241.26.7)> FEAT
(000005)3/11/2016 16:47:01 PM - user (141.241.26.7)> 211-Features:
(000005)3/11/2016 16:47:01 PM - user (141.241.26.7)>  MDTM
(000005)3/11/2016 16:47:01 PM - user (141.241.26.7)>  REST STREAM
(000005)3/11/2016 16:47:01 PM - user (141.241.26.7)>  SIZE
(000005)3/11/2016 16:47:01 PM - user (141.241.26.7)>  MLST type*;size*;modify*;
(000005)3/11/2016 16:47:01 PM - user (141.241.26.7)>  MLSD
(000005)3/11/2016 16:47:01 PM - user (141.241.26.7)>  AUTH SSL
(000005)3/11/2016 16:47:01 PM - user (141.241.26.7)>  AUTH TLS
(000005)3/11/2016 16:47:01 PM - user (141.241.26.7)>  PROT
(000005)3/11/2016 16:47:01 PM - user (141.241.26.7)>  PBSZ
(000005)3/11/2016 16:47:01 PM - user (141.241.26.7)>  UTF8
(000005)3/11/2016 16:47:01 PM - user (141.241.26.7)>  CLNT
(000005)3/11/2016 16:47:01 PM - user (141.241.26.7)>  MFMT
(000005)3/11/2016 16:47:01 PM - user (141.241.26.7)>  EPSV
(000005)3/11/2016 16:47:01 PM - user (141.241.26.7)>  EPRT
(000005)3/11/2016 16:47:01 PM - user (141.241.26.7)> 211 End
(000005)3/11/2016 16:47:01 PM - user (141.241.26.7)> PWD
(000005)3/11/2016 16:47:01 PM - user (141.241.26.7)> 257 "/" is current directory.
(000005)3/11/2016 16:47:02 PM - user (141.241.26.7)> EPSV
(000005)3/11/2016 16:47:02 PM - user (141.241.26.7)> 229 Entering Extended Passive Mode (|||50629|)
(000005)3/11/2016 16:47:02 PM - user (141.241.26.7)> LIST
(000005)3/11/2016 16:47:02 PM - user (141.241.26.7)> 150 Opening data channel for directory listing of "/"
(000005)3/11/2016 16:47:02 PM - user (141.241.26.7)> 226 Successfully transferred "/"

相关内容