SOCKS4/PuTTY - Small file upload "Transfer failed."

I'm using SOCKS4 over PuTTY SSH.

Remote file size of zero (0) after uploading files < 8kb. Files bigger than this appear to transfer.

I have verified file size of 0 on the server with a 'ls -l'.

This appears to be fixed in latest dev build but isn't mentioned in the known issues post.




    SmartFTP v1.5.988.32



    Resolving host name "192.168.10.100"



    Proxy: Resolving host name 127.0.0.1



    Connecting to 192.168.10.100 Port: 21



    Proxy: Connecting to SOCKS4 proxy server 127.0.0.1 Port: 6060



    Proxy: Connected to proxy server. Sending connection request.



    Connected to 192.168.10.100.



220 (vsFTPd 2.0.3)



    USER userid



331 Please specify the password.



    PASS (hidden)



230 Login successful.



    SYST



215 UNIX Type: L8



    FEAT



211-Features:



 EPRT



 EPSV



 MDTM



 PASV



 REST STREAM



 SIZE



 TVFS



211 End



    PWD



257 "/home/userid"



    CWD /home/userid/test



250 Directory successfully changed.



    PWD



257 "/home/userid/test"



    Compression disabled for private IP addresses.



    TYPE I



200 Switching to Binary mode.



    PASV



227 Entering Passive Mode (192,168,10,100,140,52)



    Proxy: Resolving host name 127.0.0.1



    Opening data connection to 192.168.10.100 Port: 35892



    Proxy: Connecting to SOCKS4 proxy server 127.0.0.1 Port: 6060



    LIST -aL



    Proxy: Connected to proxy server. Sending connection request.



150 Here comes the directory listing.



    191 bytes transferred. (872 bytes/s) (219 ms)



226 Directory send OK.



    SIZE file.test



550 Could not get file size.



    Compression disabled for private IP addresses.



    PASV



227 Entering Passive Mode (192,168,10,100,132,155)



    Proxy: Resolving host name 127.0.0.1



    Opening data connection to 192.168.10.100 Port: 33947



    Proxy: Connecting to SOCKS4 proxy server 127.0.0.1 Port: 6060



    STOR Copy of file.test



    Proxy: Connected to proxy server. Sending connection request.



    8192 bytes transferred. (500 KB/s) (16 ms)



150 Ok to send data.



226 File receive OK.



    SIZE Copy of file.test



213 0



    File size mismatch.



    Compression disabled for private IP addresses.



    PASV



227 Entering Passive Mode (192,168,10,100,233,116)



    Proxy: Resolving host name 127.0.0.1



    Opening data connection to 192.168.10.100 Port: 59764



    Proxy: Connecting to SOCKS4 proxy server 127.0.0.1 Port: 6060



    LIST -aL



    Proxy: Connected to proxy server. Sending connection request.



150 Here comes the directory listing.



    271 bytes transferred. (1.13 KB/s) (234 ms)



226 Directory send OK.



    Transfer failed.



It's not fixed in the latest dev build. The log just was different... Now I'm not sure if this is a SmartFTP problem.







    SmartFTP v1.5.988.38



    Resolving host name "192.168.10.100"



    Proxy: Resolving host name 127.0.0.1



    Connecting to 192.168.10.100 Port: 21



    Proxy: Connecting to SOCKS4 proxy server 127.0.0.1 Port: 6060







    Proxy: Connected to proxy server. Sending connection request.



    Connected to 192.168.10.100.



220 (vsFTPd 2.0.3)



    USER userid



331 Please specify the password.



    PASS (hidden)



230 Login successful.



    SYST



215 UNIX Type: L8



    FEAT



211-Features:



 EPRT



 EPSV



 MDTM



 PASV



 REST STREAM



 SIZE



 TVFS



211 End



    PWD



257 "/home/userid"



    CWD /home/userid/test



250 Directory successfully changed.



    PWD



257 "/home/userid/test"



    Compression disabled for private IP addresses.



    TYPE I



200 Switching to Binary mode.



    PASV



227 Entering Passive Mode (192,168,10,100,159,170)



    Proxy: Resolving host name 127.0.0.1



    Opening data connection to 192.168.10.100 Port: 40874



    Proxy: Connecting to SOCKS4 proxy server 127.0.0.1 Port: 6060



    LIST -aL



    Proxy: Connected to proxy server. Sending connection request.



150 Here comes the directory listing.



    119 bytes transferred. (281 bytes/s) (422 ms)



226 Directory send OK.



    SIZE Copy of file.test



550 Could not get file size.



    Compression disabled for private IP addresses.



    PASV



227 Entering Passive Mode (192,168,10,100,81,55)



    Proxy: Resolving host name 127.0.0.1



    Opening data connection to 192.168.10.100 Port: 20791



    Proxy: Connecting to SOCKS4 proxy server 127.0.0.1 Port: 6060



    STOR Copy of file.test



    Proxy: Connected to proxy server. Sending connection request.



    8192 bytes transferred. (N/A/s) (0 ms)



150 Ok to send data.



226 File receive OK.



    SIZE Copy of file.test



213 0



    File size mismatch.



    Compression disabled for private IP addresses.



    PASV



227 Entering Passive Mode (192,168,10,100,56,86)



    Proxy: Resolving host name 127.0.0.1



    Opening data connection to 192.168.10.100 Port: 14422



    Proxy: Connecting to SOCKS4 proxy server 127.0.0.1 Port: 6060



    LIST -aL



    Proxy: Connected to proxy server. Sending connection request.



150 Here comes the directory listing.



    199 bytes transferred. (635 bytes/s) (313 ms)



226 Directory send OK.



    Transfer successful.







+- System -----------------------------



Microsoft Windows 2000 Professional 



Service Pack 4 (Build 2195)







CPU Speed         : 2423 MHz



Total Memory      : 523736 KB



Free Memory       : 347280 KB







+- SmartFTP ---------------------------



Version           : 1.5.988.38



Time Stamp        : 2005-07-14 22:05:54







+- Application DLL --------------------



controls.dll      : 1.6.988.38



sfFTPLib.dll      : 1.5.2.3



SmartHook.dll     : 







+- Language ---------------------------



SmartFTP.exe      : 1.5.988.38







+- System DLL -------------------------



shell32.dll       : 5.00.3900.7032



shlwapi.dll       : 6.00.2800.1612 (xpsp2.041207-1145)



comctl32.dll      : 5.81



riched20.dll      : 5.30.23.1215



schannel.dll      : 5.00.2195.6899







+- Internet Explorer ------------------



Version           : 6.0.2800.1106







+- Winsock ----------------------------



Winsock           : 2.2

Please try it with the latest build again:
https://www.smartftp.com/download

Thanks.

Regards,
-Mat

this bug still exists... its extremely annoying. i've removed the old install & installed the latest build - still a recurring problem. any file under 8kb gets uploaded as zero'd file & subsequentially stops the entire upload. i'm using windows xp, socks5 proxy setup.





..

damnq: Please follow the readme and forum guide lines before posting.

Thank you.
-Mat

Hi,

I've tried using the following SmartFTP version :




+- System -----------------------------



Microsoft Windows XP Professional 



Service Pack 2 (Build 2600)







CPU Speed         : 2200 MHz



Total Memory      : 523248 KB



Free Memory       : 302288 KB







+- SmartFTP ---------------------------



Version           : 1.5.988.47



Time Stamp        : 2005-07-23 03:06:42







+- Application DLL --------------------



Controls.dll      : 1.6.988.47



sfFTPLib.dll      : 1.5.3.0



SmartHook.dll     : 1.0.2.1







+- Language ---------------------------



SmartFTP.exe      : 1.5.988.47







+- System DLL -------------------------



shell32.dll       : 6.00.2900.2620 (xpsp_sp2_gdr.050225-1820)



shlwapi.dll       : 6.00.2900.2668 (xpsp_sp2_gdr.050430-1553)



comctl32.dll      : 6.0 (xpsp_sp2_rtm.040803-2158)



riched20.dll      : 5.30.23.1221



schannel.dll      : 5.1.2600.2180 (xpsp_sp2_rtm.040803-2158)







+- Internet Explorer ------------------



Version           : 6.0.2900.2180







+- Winsock ----------------------------



Winsock           : 2.2




My FTP and SSH servers are :
SSH: OpenSSH_4.1p1, OpenSSL 0.9.7g 11 Apr 2005 (Cygwin)
FTP: Serv-U 5.1.0.0

Transfering the file "a.txt" with only "1" as content.


Trying with Putty 0.58 (only relevant information) :



    Remote file exist check: 'a.txt'.



    SIZE a.txt



550 /-------/a.txt: No such file.



    Estimated Compression Ratio of '--------a.txt': 900.00% (9 octets/1 octets)



    MODE S



200 MODE S ok.



    PASV



227 Entering Passive Mode (---.---.---.---,15,161)



    Proxy: Resolving host name localhost



    Opening data connection to ---.---.---.--- Port: 4001



    Proxy: Connecting to SOCKS5 proxy server localhost Port: 1080



    STOR a.txt



    Proxy: Connected to proxy server. Sending connection request.



    1 bytes transferred. (N/A/s) (0 ms)



150 Opening BINARY mode data connection for a.txt.



226 Transfer complete.



    SIZE a.txt



213 0



    File size mismatch.



    MODE Z



200 MODE Z ok.



    PASV



227 Entering Passive Mode (---.---.---.---,15,161)



    Proxy: Resolving host name localhost



    Opening data connection to ---.---.---.--- Port: 4001



    Proxy: Connecting to SOCKS5 proxy server localhost Port: 1080



    LIST -aLT



    Proxy: Connected to proxy server. Sending connection request.



150 Opening ASCII mode data connection for /bin/ls.



226 Transfer complete.



    95 bytes transferred. (405 octets/s) (234 ms)



    Transfer failed.



    SIZE a.txt



213 0




The tranfer is bad AND the followed LIST command failed!!!


Now, trying the Cygwin SSH tool (OpenSSH_4.1p1, OpenSSL 0.9.8 05 Jul 2005) :




    Remote file exist check: 'a.txt'.



    SIZE a.txt



550 /------/a.txt: No such file.



    Estimated Compression Ratio of '------a.txt': 900.00% (9 octets/1 octets)



    MODE S



200 MODE S ok.



    PASV



227 Entering Passive Mode (---.---.---.---,15,161)



    Proxy: Resolving host name localhost



    Opening data connection to ---.---.---.--- Port: 4001



    Proxy: Connecting to SOCKS5 proxy server localhost Port: 1081



    STOR a.txt



    Proxy: Connected to proxy server. Sending connection request.



150 Opening BINARY mode data connection for a.txt.



    1 bytes transferred. (4 octets/s) (203 ms)



226 Transfer complete.



    SIZE a.txt



213 1



    MODE Z



200 MODE Z ok.



    PASV



227 Entering Passive Mode (---.---.---.---,15,161)



    Proxy: Resolving host name localhost



    Opening data connection to ---.---.---.--- Port: 4001



    Proxy: Connecting to SOCKS5 proxy server localhost Port: 1081



    LIST -aLT



    Proxy: Connected to proxy server. Sending connection request.



150 Opening ASCII mode data connection for /bin/ls.



226 Transfer complete.



    97 bytes transferred. (3,05 Ko/s) (31 ms)



    Transfer successful.






So, I think Putty has problems while handling SOCKS connection (maybe not enough data: 8kB is a common value for a buffer size...).

legume, damnq: Can you give us more information on the SSH server and can you try using other SSH client ?


Olivier

Hi again,

http://www.chiark.greenend.org.uk/~sgta ... rrupt.html

SmartFTP is innocent ;-)

Olivier

Thanks for your research :-)

-Mat