FTP: binary file in text mode keeps restarting

Bug reports will be moved here when the described bug has been fixed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
Mercade
Junior Member
Junior Member
Posts: 31
Joined: 2003-07-20, 17:51 UTC

FTP: binary file in text mode keeps restarting

Post by *Mercade »

During FTP I had the transfer mode set to text mode.
I tried to download a tar file in separate thread/background.
It gave me a warning asking to abort because of the type-incompatibility.
When clicking to abort, it would re-try the file and come up with the same abort warning (and again ...).
User avatar
petermad
Power Member
Power Member
Posts: 14743
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

Confirmed!!
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48028
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

2petermad
I can reproduce this error with TC 7.55 final, but NOT with TC 7.55a beta. Sicne you have the beta, could you reproduce the error with it too? If yes, please send me a log file of the problem.
Author of Total Commander
https://www.ghisler.com
User avatar
petermad
Power Member
Power Member
Posts: 14743
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

Yes I can reproduce it with TC 7.55apre2, but not with TC 7.50a

It doesn't seem that TC logs anything if the file is the only one to be downloaded.

But anyway here are 3 logs for TC 7.50a, 7.55 final and 7.55apre2:

TC 7.50a:
----------
Connect to: (04-07-2010 11:12:26)
hostname=YYYYYYYY
username=XXXXXXXX
startdir=public_html/
YYYYYYYY=ZZZZZZZZ
220---------- Welcome to Pure-FTPd [TLS] ----------
220-You are user number 1 of 50 allowed.
220-Local time is now 11:12. Server port: 21.
220-This is a private system - No anonymous login
220 You will be disconnected after 15 minutes of inactivity.
USER XXXXXXXX
331 User XXXXXXXX OK. Password required
PASS ***********
230-User XXXXXXXX has group access to: XXXXXXXX
230 OK. Current restricted directory is /
SYST
215 UNIX Type: L8
FEAT
211-Extensions supported:
EPRT
IDLE
MDTM
SIZE
REST STREAM
MLST type*;size*;sizd*;modify*;UNIX.mode*;UNIX.uid*;UNIX.gid*;unique*;
MLSD
ESTP
PASV
EPSV
SPSV
ESTA
AUTH TLS
PBSZ
PROT
211 End.
OPTS UTF8 ON
500 Unknown command
CWD public_html/
250 OK. Current directory is /public_html
Connect ok!
PWD
257 "/public_html" is your current location
Hent mappe
TYPE A
200 TYPE is now ASCII
PORT 192,168,1,11,5,105
200 PORT command successful
LIST -la
150 Connecting to port 59903
Download
Venter på server...
226-Options: -a -l
226 202 matches total
QUIT
221-Goodbye. You uploaded 0 and downloaded 0 kbytes.
221 Logout.
7.55final:

----------
Connect to: (04-07-2010 11:05:42)
hostname=YYYYYYYY
username=XXXXXXXX
startdir=public_html/
YYYYYYYY=ZZZZZZZZ
220---------- Welcome to Pure-FTPd [TLS] ----------
220-You are user number 1 of 50 allowed.
220-Local time is now 11:05. Server port: 21.
220-This is a private system - No anonymous login
220 You will be disconnected after 15 minutes of inactivity.
USER XXXXXXXX
331 User XXXXXXXX OK. Password required
PASS ***********
230-User XXXXXXXX has group access to: XXXXXXXX
230 OK. Current restricted directory is /
SYST
215 UNIX Type: L8
FEAT
211-Extensions supported:
EPRT
IDLE
MDTM
SIZE
REST STREAM
MLST type*;size*;sizd*;modify*;UNIX.mode*;UNIX.uid*;UNIX.gid*;unique*;
MLSD
ESTP
PASV
EPSV
SPSV
ESTA
AUTH TLS
PBSZ
PROT
211 End.
HELP SITE
214-The following SITE commands are recognized
ALIAS
CHMOD
IDLE
UTIME
214 Pure-FTPd - http://pureftpd.org/
OPTS UTF8 ON
500 Unknown command
CWD public_html/
250 OK. Current directory is /public_html
Connect ok!
PWD
257 "/public_html" is your current location
Hent mappe
TYPE A
200 TYPE is now ASCII
PORT 192,168,1,11,5,61
200 PORT command successful
MLSD
150 Connecting to port 59820
Download
Venter på server...
226-Options: -a -l
226 202 matches total
QUIT
221-Goodbye. You uploaded 0 and downloaded 0 kbytes.
221 Logout.
7.55apre2:

----------
Connect to: (04-07-2010 11:08:16)
hostname=YYYYYYYY
username=XXXXXXXX
startdir=public_html/
YYYYYYYY=ZZZZZZZZ
220---------- Welcome to Pure-FTPd [TLS] ----------
220-You are user number 1 of 50 allowed.
220-Local time is now 11:08. Server port: 21.
220-This is a private system - No anonymous login
220 You will be disconnected after 15 minutes of inactivity.
USER XXXXXXXX
331 User XXXXXXXX OK. Password required
PASS ***********
230-User XXXXXXXX has group access to: XXXXXXXX
230 OK. Current restricted directory is /
SYST
215 UNIX Type: L8
FEAT
211-Extensions supported:
EPRT
IDLE
MDTM
SIZE
REST STREAM
MLST type*;size*;sizd*;modify*;UNIX.mode*;UNIX.uid*;UNIX.gid*;unique*;
MLSD
ESTP
PASV
EPSV
SPSV
ESTA
AUTH TLS
PBSZ
PROT
211 End.
HELP SITE
214-The following SITE commands are recognized
ALIAS
CHMOD
IDLE
UTIME
214 Pure-FTPd - http://pureftpd.org/
OPTS UTF8 ON
500 Unknown command
CWD public_html/
250 OK. Current directory is /public_html
Connect ok!
PWD
257 "/public_html" is your current location
Hent mappe
TYPE A
200 TYPE is now ASCII
PORT 192,168,1,11,5,81
200 PORT command successful
MLSD
150 Connecting to port 59834
Download
Venter på server...
226-Options: -a -l
226 202 matches total
QUIT
221-Goodbye. You uploaded 0 and downloaded 0 kbytes.
221 Logout.
The line:
226 202 matches total
is the last line in the log before I start downloading in the background - so you can see - nothing is logged about the failed download.


It works as expected in TC 7.50a, but not in 7.55 and 7.55apre2. In both 7.55's I can abort the download by pressing the Yes button in the warning dialog 4 to 6 times.


Here is the remaining log - if I do not use background transfer:
PORT 192,168,1,11,4,230
200 PORT command successful
RETR topdanmark.tar
150-Connecting to port 59581
150 461.5 kbytes to download
Download
Afbrydelse!
ADVARSEL: Binær fil overført som tekst!
Venter på server...
450 Error during write to data connection
In this case TC aborts the download correctly when I press Yes in the warning dialog.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48028
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

(Edit: See below)
Please add the following line to wcx_ftp.ini under [General] to get a detailed log of the background transfer:
SpecialFlags=16

Since I cannot reproduce the problem here, I need the detailed log of the problem. Thanks.

Edit: It seems that SpecialFlags=16 turns off the binary warning in the background alltogether. I will correct that.
Author of Total Commander
https://www.ghisler.com
User avatar
petermad
Power Member
Power Member
Posts: 14743
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

t seems that SpecialFlags=16 turns off the binary warning in the background alltogether
That's also what I experience.

BTW: If I try to UPload a binary file as text, and I answer Yes to abort the transfer - I get the message: 1218="Upload aborted!"

If I do the same when DOWNloading I get the message: 1186="Error downloading file!" - I think it would be better to use: 1217="Download aborted!" since it is a user chosen action.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48028
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I will consider it for TC8. Currently TC cannot see from the location where it shows the error why the transfer stopped.
Author of Total Commander
https://www.ghisler.com
Mercade
Junior Member
Junior Member
Posts: 31
Joined: 2003-07-20, 17:51 UTC

Post by *Mercade »

I confirm that in 7.55a this bug of restarting a binary download in text mode no longer occurs.

When answering "Yes" I get the "Error downloading file" message now as expected.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48028
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Thanks for your feedback!
Author of Total Commander
https://www.ghisler.com
Post Reply