3

I have an FTP-server (ProFTPD 1.3.4b) on Linux and an FTPS client (MOVEit Freely 4.5.1.2 - Secure FTP Client) on Windows.

I connect like this

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

and then initiate the download like this

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.

it fails.

If instead of the get ... as show above I do 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

it succeeds.

The remote file's mode is:

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

The client may write locally.

Why does get fail and mget does not?


Update

The server logs (tail -f xferlog access.log auth.log proftpd.debug.log proftpd_tls.log) for an equivalent session:

==> 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
2
  • Can you show us FTP server log? Though I guess it's a bug in the FTP client. Sep 25 '15 at 17:12
  • @MartinPrikryl: I added the session's server logs.
    – alk
    Sep 25 '15 at 17:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.