获取 GET 命令的 FTP 返回代码 450,但获取 MGET 命令的 FTP 返回代码 450

获取 GET 命令的 FTP 返回代码 450,但获取 MGET 命令的 FTP 返回代码 450

我在 Linux 上有一个 FTP 服务器(ProFTPD 1.3.4b),在 Windows 上有一个 FTPS 客户端(MOVEit Freely 4.5.1.2 - 安全 FTP 客户端)。

我像这样连接

220 ProFTPD 1.3.4b Server (FTP with TLS) [1.2.3.4]
234 AUTH TLS successful
Connected to my.ftp.server
232 User myaccount logged in
200 PBSZ 0 successful
200 Protection set to Private
215 UNIX Type: L8

然后像这样开始下载

ftp> get my.file
200 PORT command successful
150 Opening ASCII mode data connection for my.file (12345 bytes)
450 Transfer aborted. Link to file server lost
Error: Failed to open data source.
ftp: 0 bytes received in 0.02Seconds 0.00Kbytes/sec.

它失败。

如果我不像get ...上面那样做mget ...

ftp> prompt
Interactive mode Off .
ftp> mget my.file
200 PORT command successful
150 Opening ASCII mode data connection for file list
ftp: 50 bytes received in 0.01Seconds 3.26Kbytes/sec.
226 Transfer complete
200 PORT command successful
150 Opening ASCII mode data connection for my.file (12345 bytes)
226 Transfer complete

它成功了。

远程文件的模式是:

-rw-r--r-- 1 someusr somegrp 12345 Sep 24 21:10 my.file

客户端可以在本地写入。

为什么会get失败并且mget不会呢?


更新

服务器将记录 ( tail -f xferlog access.log auth.log proftpd.debug.log proftpd_tls.log) 等效会话:

==> proftpd.debug.log <==
Sep 25 19:17:37 my.ftp.server proftpd[30719] 1.2.3.4 (5.6.7.8[5.6.7.8]): FTP session opened.

==> proftpd_tls.log <==
Sep 25 19:17:37 mod_tls/2.4.3[30719]: TLS/TLS-C requested, starting TLS handshake
Sep 25 19:17:37 mod_tls/2.4.3[30719]: Client: DC = mydc1, DC = mydc2, OU = myou, CN = mycn
Sep 25 19:17:37 mod_tls/2.4.3[30719]: TLSv1/SSLv3 connection accepted, using cipher some_cypher (x bits)
Sep 25 19:17:37 mod_tls/2.4.3[30719]: Received user : myaccount my_cert_infos....
Sep 25 19:17:37 mod_tls/2.4.3[30719]: TLS/X509 cert mapping successful for user 'myaccount'

==> proftpd.debug.log <==
Sep 25 19:17:37 my.ftp.server proftpd[30719] 1.2.3.4 (5.6.7.8[5.6.7.8]): USER myaccount: TLS/X509 cert mapping successful
Sep 25 19:17:37 my.ftp.server proftpd[30719] 1.2.3.4 (5.6.7.8[5.6.7.8]): USER myaccount: Authenticated without password

==> auth.log <==
[25/Sep/2015:19:17:39 +0200] FTP with TLS [30719] 5.6.7.8 "PASS (hidden)" 232
[25/Sep/2015:19:17:39 +0200] FTP with TLS [30719] 5.6.7.8 "USER myaccount" -

==> proftpd.debug.log <==
Sep 25 19:17:39 my.ftp.server proftpd[30719] 1.2.3.4 (5.6.7.8[5.6.7.8]): USER myaccount: Login successful.

==> auth.log <==

==> proftpd_tls.log <==
Sep 25 19:17:39 mod_tls/2.4.3[30719]: Protection set to Private
Sep 25 19:17:59 mod_tls/2.4.3[30719]: starting TLS negotiation on data connection
Sep 25 19:17:59 mod_tls/2.4.3[30719]: TLSv1/SSLv3 renegotiation accepted, using cipher some_cypher (x bits)
Sep 25 19:17:59 mod_tls/2.4.3[30719]: TLSv1/SSLv3 data connection accepted, using cipher some_cypher (x bits)

==> xferlog <==
Fri Sep 25 19:17:59 2015 0 5.6.7.8 0 my.file a _ o r myaccount othergrp 0 * i

==> proftpd.debug.log <==
Sep 25 19:17:59 my.ftp.server proftpd[30719] 1.2.3.4 (5.6.7.8[5.6.7.8]): notice: user myaccount: aborting transfer: Link to file server lost

==> access.log <==
[25/Sep/2015:19:17:59 +0200] 5.6.7.8 myaccount "RETR my.file" 450 0 my.file

==> proftpd_tls.log <==
Sep 25 19:18:07 mod_tls/2.4.3[30719]: starting TLS negotiation on data connection
Sep 25 19:18:07 mod_tls/2.4.3[30719]: TLSv1/SSLv3 renegotiation accepted, using cipher some_cypher (x bits)
Sep 25 19:18:07 mod_tls/2.4.3[30719]: starting TLS negotiation on data connection
Sep 25 19:18:07 mod_tls/2.4.3[30719]: TLSv1/SSLv3 renegotiation accepted, using cipher some_cypher (x bits)

==> access.log <==
[25/Sep/2015:19:18:07 +0200] 5.6.7.8 myaccount "RETR my.file" 226 12345 my.file

==> xferlog <==
Fri Sep 25 19:18:07 2015 0 5.6.7.8 12345 my.file a _ o r myaccount othergrp 0 * c

相关内容