У меня есть FTP-сервер (ProFTPD 1.3.4b) в Linux и клиент FTPS (MOVEit Freely 4.5.1.2 - Secure FTP Client) в Windows.
Я подключаюсь вот так
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