Skip to content

gftp-text try to reconnect every time before downloading while gftp-gtk have normal behavior #199

Description

@nbanb

Hi

Could someone explane this behavior with gftp-text :

Connected to 10.0.20.55:4021
220 FTP
AUTH TLS
234 AUTH TLS successful
SSL connection established using TLSv1.3 (TLS_AES_256_GCM_SHA384)
PBSZ 0
200 PBSZ 0 successful
PROT P
200 Protection set to Private
USER test
331 Password required for test
PASS xxxx
230 User test logged in
FEAT
TYPE I
200 Type set to I
PWD
257 "/" is the current directory
ftp> cd test/
CWD test/
250 CWD command successful
PWD
257 "/test" is the current directory
ftp> ls
Loading directory listing /test from server (LC_TIME=en_US.UTF-8)
EPSV
229 Entering Extended Passive Mode (|||60001|)
MLSD
150 Opening BINARY mode data connection for MLSD
SSL data connection established using TLSv1.2 (ECDHE-ECDSA-AES256-GCM-SHA384)
226 Transfer complete
drwxr-xr-x     test www-data        4096 May 19 07:03 ..
drwxr-xr-x     test www-data        4096 May 14 20:34 test
-rw-r--r--     test www-data     8388608 May 14 20:32 binfile0
-rw-r--r--     test www-data     8388608 May 14 20:33 binfile1
-rw-r--r--     test www-data         176 May 14 20:34 textfile0
-rw-r--r--     test www-data          44 May 14 20:31 textfile1
ftp> get binfile0
Loading directory listing /test from cache (LC_TIME=en_US.UTF-8)
Looking up 10.0.20.55
Trying 10.0.20.55:4021
Connected to 10.0.20.55:4021
220 FTP
AUTH TLS
234 AUTH TLS successful
SSL connection established using TLSv1.3 (TLS_AES_256_GCM_SHA384)
PBSZ 0
200 PBSZ 0 successful
PROT P
200 Protection set to Private
USER test
331 Password required for test
PASS xxxx
230 User test logged in
FEAT
TYPE I
200 Type set to I
CWD /test
250 CWD command successful
PWD
257 "/test" is the current directory
Successfully changed local directory to /home/nba/over-tls/ftps-over-tls
Successfully changed local directory to /home/nba/over-tls/ftps-over-tls
EPSV
229 Entering Extended Passive Mode (|||60003|)
RETR /test/binfile0
150 Opening BINARY mode data connection for /test/binfile0 (8388608 bytes)
SSL data connection established using TLSv1.2 (ECDHE-ECDSA-AES256-GCM-SHA384)
\ [============================================================] @ 1429.00KB/s
226 Transfer complete
Successfully transferred /test/binfile0 at 1429.00 KB/s
Successfully changed mode of /home/nba/over-tls/ftps-over-tls/binfile0 to 644
Successfully changed the time stamp of /home/nba/over-tls/ftps-over-tls/binfile0
ftp> cd test/
CWD test/
ftp> ls
Loading directory listing /test from cache (LC_TIME=en_US.UTF-8)
drwxr-xr-x     test www-data        4096 May 19 07:03 ..
drwxr-xr-x     test www-data        4096 May 14 20:34 test
-rw-r--r--     test www-data     8388608 May 14 20:32 binfile0
-rw-r--r--     test www-data     8388608 May 14 20:33 binfile1
-rw-r--r--     test www-data         176 May 14 20:34 textfile0
-rw-r--r--     test www-data          44 May 14 20:31 textfile1
ftp> get binfile1
Loading directory listing /test from cache (LC_TIME=en_US.UTF-8)
Looking up 10.0.20.55
Trying 10.0.20.55:4021
Connected to 10.0.20.55:4021
220 FTP
AUTH TLS
234 AUTH TLS successful
SSL connection established using TLSv1.3 (TLS_AES_256_GCM_SHA384)
PBSZ 0
200 PBSZ 0 successful
PROT P
200 Protection set to Private
USER test
331 Password required for test
PASS xxxx
230 User test logged in
FEAT
TYPE I
200 Type set to I
CWD /test
250 CWD command successful
PWD
257 "/test" is the current directory
Successfully changed local directory to /home/nba/over-tls/ftps-over-tls
Successfully changed local directory to /home/nba/over-tls/ftps-over-tls
EPSV
229 Entering Extended Passive Mode (|||60003|)
RETR /test/binfile1
150 Opening BINARY mode data connection for /test/binfile1 (8388608 bytes)
SSL data connection established using TLSv1.2 (ECDHE-ECDSA-AES256-GCM-SHA384)
| [============================================================] @ 1434.60KB/s
226 Transfer complete
Successfully transferred /test/binfile1 at 1434.60 KB/s
Successfully changed mode of /home/nba/over-tls/ftps-over-tls/binfile1 to 644
Successfully changed the time stamp of /home/nba/over-tls/ftps-over-tls/binfile1
ftp> cd ..
CDUP

Interresting part are :

ftp> get binfile0
Loading directory listing /test from cache (LC_TIME=en_US.UTF-8)
Looking up 10.0.20.55
Trying 10.0.20.55:4021
Connected to 10.0.20.55:4021
220 FTP
AUTH TLS
234 AUTH TLS successful
...

and

ftp> get binfile1
Loading directory listing /test from cache (LC_TIME=en_US.UTF-8)
Looking up 10.0.20.55
Trying 10.0.20.55:4021
Connected to 10.0.20.55:4021
220 FTP
AUTH TLS
234 AUTH TLS successful
...

Why does gFTP (gftp-text) reconnect the CONTROL CHANNEL which is already established at each download try ?
I understand a new PASV / EPSV / EPRT command must be issued by client to establish data transfert BUT I don't understand why it try to reconnect the control channel ...

Please note that gftp-gtk DO NOT have this behavior.
Here is output log from GUI (sorry in desktop language: french) :

220 FTP
AUTH TLS
234 AUTH TLS successful
SSL connection established using TLSv1.3 (TLS_AES_256_GCM_SHA384)
PBSZ 0
200 PBSZ 0 successful
PROT P
200 Protection set to Private
USER test
331 Password required for test
PASS xxxx
230 User test logged in
FEAT
TYPE I
200 Type set to I
PWD
257 "/" is the current directory
Chargement du répertoire / depuis le serveur  (LC_TIME=fr_FR.UTF-8)
EPSV
229 Entering Extended Passive Mode (|||60001|)
MLSD
150 Opening BINARY mode data connection for MLSD
SSL data connection established using TLSv1.2 (ECDHE-ECDSA-AES256-GCM-SHA384)
226 Transfer complete
CWD /test
250 CWD command successful
PWD
257 "/test" is the current directory
Chargement du répertoire /test depuis le serveur  (LC_TIME=fr_FR.UTF-8)
EPSV
229 Entering Extended Passive Mode (|||60000|)
MLSD
150 Opening BINARY mode data connection for MLSD
SSL data connection established using TLSv1.2 (ECDHE-ECDSA-AES256-GCM-SHA384)
226 Transfer complete
Changement réussi du répertoire local vers /home/nba
EPSV
229 Entering Extended Passive Mode (|||60007|)
RETR /test/binfile0
150 Opening BINARY mode data connection for /test/binfile0 (8388608 bytes)
SSL data connection established using TLSv1.2 (ECDHE-ECDSA-AES256-GCM-SHA384)
226 Transfer complete
Transfert réussi de /test/binfile0 à 1422,66 ko/s
Changement de mode réussi de /home/nba/binfile0 en 644
Changement réussi de l horodatage de /home/nba/binfile0
Changement réussi du répertoire local vers /home/nba
EPSV
229 Entering Extended Passive Mode (|||60003|)
RETR /test/binfile1
150 Opening BINARY mode data connection for /test/binfile1 (8388608 bytes)
SSL data connection established using TLSv1.2 (ECDHE-ECDSA-AES256-GCM-SHA384)
226 Transfer complete
Transfert réussi de /test/binfile1 à 1391,77 ko/s
Changement de mode réussi de /home/nba/binfile1 en 644
Changement réussi de l horodatage de /home/nba/binfile1

 ...

Is this reconnection of gftp-text before every download a normal behavior ?
What could explane this behavior of gftp-text and the "normal" behavior of gftp-gtk ?

Thanks for help
Kind regards
nbanb

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions