1 bug + 1 problem in ftp handling

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
Raskarian
Junior Member
Junior Member
Posts: 6
Joined: 2003-11-18, 00:10 UTC

1 bug + 1 problem in ftp handling

Post by *Raskarian »

a) In ftp handling there is a bug in ABOR command.
Instead of sending exactly "ABOR", Total Commander sends "?ABOR" which many servers don't understand ('?' is 0xF2)
Example conversation:
> RETR some.file
< 150 Opening BINARY mode data connection for some.file
> ?ABOR
< 500 '?ABOR': command not understood.

This bug is present in all version WinCmd & TotalCmd since I knew this program - in 4.x and 5.x.
 
 
b)
Ftp transfers can be active or passive.
Total Commander use active connections until we change it.
But we can only change it when we add host to bookmarks!

Most people in the world using TotalCmd are in LAN with internal IP.
They cannot use active connections!
And almost every ftp servers accept both type of connection.

Also, most people don't know anything about passive and active connections, so they can't change this setting.
However, if they know that, they can't change connection to passive in Ctrl+N dialog - there is no such option!

We can change this behavior by a hidden option in wcx_ftp.ini file:
[default]
PasvMode=1
but who know it??
  
So I recommend to change default TotalCmd behavior, or to add an option
PasvMode=1 to wcx_ftp.ini on fresh install.

Ps. I'm new in this forum so I'm not sure if this is adequate place for my problem, I hope it is.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48083
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

a) this isn't a bug! Total Commander sends the Telnet "Interrupt Process" and "Synch" signals before sending "ABOR", to notify the server about the interruption. This is defined in RFC959, the main FTP standards document. Here is the relevant part:
Certain commands (such as ABOR, STAT, QUIT) may be sent over the
control connection while a data transfer is in progress. Some
servers may not be able to monitor the control and data connections
simultaneously, in which case some special action will be necessary
to get the server's attention. The following ordered format is
tentatively recommended:

1. User system inserts the Telnet "Interrupt Process" (IP) signal
in the Telnet stream.

2. User system sends the Telnet "Synch" signal.

3. User system inserts the command (e.g., ABOR) in the Telnet
stream.

4. Server PI, after receiving "IP", scans the Telnet stream for
EXACTLY ONE FTP command.
b) In TC 6.0, you can now set it in the configuration! TC 6.0 has just been released!
Author of Total Commander
https://www.ghisler.com
Raskarian
Junior Member
Junior Member
Posts: 6
Joined: 2003-11-18, 00:10 UTC

Post by *Raskarian »

a) So this is a bug in Serv-U FTP Server ?
(i know that one of serwers which answers like "500 '?ABOR': command not understood." was Serv-U)

I've checked FlashFXP - there is no 0xF2 in tcp stream before 'ABOR' and all servers understand it's ABOR command.

However, there is still bug but in view (Central European font): ;)

Image: http://przechowalnia.republika.pl/totalcmd/abor.png
 
 
b) I'm very glad that this option appear.
But, I really think that it should be checked by default.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48083
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

a) If the server really responds with "command not understood", then it's clearly a fault in Serv-U, because it is ignoring RFC959! All FTP Servers MUST conform to RFC959.

b) unfortunately not all ftp servers work with passive mode! For example, when I was at the University, the VMS server there didn't understand passive mode!
Author of Total Commander
https://www.ghisler.com
User avatar
Hacker
Moderator
Moderator
Posts: 13065
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

Christian,
a) If the server really responds with "command not understood", then it's clearly a fault in Serv-U, because it is ignoring RFC959! All FTP Servers MUST conform to RFC959.
The question is if there should be a '?' before the ABOR.

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48083
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

This isn't a ? it's the Telnet "Synch" signal! It's an unprintable character. The other signal, the Telnet "Interrupt Process" (IP), isn't shown because it is sent as out of band data (OOB) to wake up the server. But it seems that not all server writers read the RFCs. :(
Author of Total Commander
https://www.ghisler.com
Raskarian
Junior Member
Junior Member
Posts: 6
Joined: 2003-11-18, 00:10 UTC

Post by *Raskarian »

a) I check windows command line ftp klient with one Serv-U Ftp Server - it also sends 0xF4 and 0xF2 (IP and part of synch) in TCP stream (as RFC says) but server can understand his command!
However 0xF4, 0xF2 sent by linux ncftp cannot be understand by Serv-U.

ftp send two packets: 1st with 0xF4 and 0xF2, 2nd with ABOR
ncftp: 1st - 0xF4, 2nd - 0xF2, 3rd - ABOR
totalcmd: only one with everything

I don't know what makes the difference :(

However it looks like a bug it in ftp transfer log (this 'n' with caron).
Could You fix it ?

b) I know that some, rarely servers can't accept passive connection (I don't remember if I've seen any of them) but MOST of klients can't use active connection.
So by making active the default setting, You deprive many (maybe about half) of Totalcmd users ability to use ftp.
I haven't met any ordinary user (not knowing computers much) who conjectured that a problem with ftp can be solved by changing type of connection.
Every one ask me, why my server doesn't work!
I've done a page for my users decribing how to change this option in totalcmd, because I can't stand this question ;)
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48083
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

No TC sends two packets too: One with 0xF4 as out of band data, and one with the rest. 0xF4 is sent separately because it has te be sent as out of band data, but it shouldn't make a difference whether the 0xF2 is sent within the same send() command or separately - TCP/IP uses the Nagle algorithm, which will package everything into one package anyway...
Author of Total Commander
https://www.ghisler.com
User avatar
Black Dog
Power Member
Power Member
Posts: 1024
Joined: 2003-02-05, 22:17 UTC
Location: Odessa
Contact:

Post by *Black Dog »

[face=courier]On 18-11-2003 02:24:25 +0000 Raskarian wrote:

R> Most people in the world using TotalCmd are in LAN with
R> internal IP.
R> They cannot use active connections!


Well, what about proxy? Works fine for me in active mode being in LAN over Wingate. Or did I missed something in your question?[/face]
Raskarian
Junior Member
Junior Member
Posts: 6
Joined: 2003-11-18, 00:10 UTC

Post by *Raskarian »

OK, I miss something:

Most of them cannot use active connections!
User avatar
Black Dog
Power Member
Power Member
Posts: 1024
Joined: 2003-02-05, 22:17 UTC
Location: Odessa
Contact:

Post by *Black Dog »

[face=courier]On 18-11-2003 16:43:16 +0000 Raskarian wrote:

R> Most of them cannot use active connections!

Well, I can't see any problem here, actually. You can suggest your users to use the same parameters M$IE has in Commander configuration, i.e. proxy type and port. Well, FTP via HTTP proxy is not always a Christmas present, but it works good for my purposes. Or did I missed something again?[/face]
Raskarian
Junior Member
Junior Member
Posts: 6
Joined: 2003-11-18, 00:10 UTC

Post by *Raskarian »

Yes - most proxies (at least in Poland) does't allow FTP connections.
User avatar
Coco
Senior Member
Senior Member
Posts: 223
Joined: 2003-02-07, 13:35 UTC
Location: Belgium
Contact:

Post by *Coco »

Personnally I also don't have any problem with the current default settings. All FTP that I use are working properly.
Alain
Raskarian
Junior Member
Junior Member
Posts: 6
Joined: 2003-11-18, 00:10 UTC

Post by *Raskarian »

It's now depending on ftp server but Your internet connection.

Any server dosn't working properly or almost every server does ;)

Nevermind, I see that I can't win :(
Post Reply