對於 GET,但對於 MGET 命令,請取得 FTP 回傳代碼 450

對於 GET,但對於 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

相關內容