local file get zeroed when source was renamed/deleted/moved

Locked
arthurleu
Posts: 5
Joined: Wed Jun 28, 2006 4:19 pm

local file get zeroed when source was renamed/deleted/moved

Post by arthurleu » Mon May 28, 2007 4:11 am

This is when I download the file and delete it after I downloaded it

Code: Select all

[04:42:34] SIZE 2007-05.sfv

[04:42:34] 213 7969

[04:42:34] MDTM 2007-05.sfv

[04:42:35] 213 20070528033455

[04:42:35] PASV

[04:42:35] 227 Entering Passive Mode (xx,xxx,xx,xxx,183,100).

[04:42:35] Proxy: Resolving host name 127.0.0.1

[04:42:35] Opening data connection to xx.xxx.xx.xxx Port: 46948

[04:42:35] Proxy: Connecting to SOCKS5 proxy server 127.0.0.1 Port: 1350

[04:42:35] RETR 2007-05.sfv

[04:42:35] Proxy: Connected to proxy server. Sending connection request.

[04:42:36] 150 Opening BINARY mode data connection for 2007-05.sfv (7969 bytes)

[04:42:36] 7969 bytes transferred. (12.1 KB/s) (641 ms)

[04:42:36] 226 Transfer complete.

[04:42:36] MDTM 2007-05.sfv

[04:42:37] 213 20070528033455

[04:42:37] DELE 2007-05.sfv

[04:42:37] 250 DELE command successful
This image shows the 8KB file dated at 4:34 (Copied from server from the MDTM)
Image

Then I tried downloading the file AGAIN (knowing it is not there)
This would be the same as if someone moved / deleted / renamed the file unintentionally

Code: Select all

[04:49:38] RETR 2007-05.sfv

[04:49:38] Proxy: Connected to proxy server. Sending connection request.

[04:49:38] 550 2007-05.sfv: No such file or directory

[04:49:38] 0 bytes transferred. (N/A/s) (0 ms)

[04:49:38] MDTM 2007-05.sfv

[04:49:38] 550 2007-05.sfv: No such file or directory
This image shows the 8KB got ZEROED dated at 4:49 (The time of the failed download)
Image

I only used a small file as an example. If you do that with a 5GB file it will be the same
I reported this ages ago in the public support but there was no response. Many of my FTP's users are suffering from this bug because the files keep being renamed / moved and as a result wasting both the server and my users' bandwidth.

Keep thinking someone would have discovered the bug and report it but I don't think anyone bothered.

Code: Select all

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

Microsoft Windows XP Professional 

Service Pack 2 (Build 2600)



CPU Speed		 : 1995 MHz

Total Memory	  : 2038 MB

Free Memory	   : 1307 MB



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

Version		   : 2.5.1005.36

Time Stamp		: 2007-05-21 03:45:14

Platform		  : x86



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

sfFTPLib.dll	  : 1.5.9.20

sfFavorites.dll   : 1.0.1.36

SmartHook.dll	 : 1.0.2.2



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

SmartFTP.exe	  : 2.5.1005.36



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

Version		   : 6.0.2900.2180



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

Winsock		   : 2.2

mb
Posts: 12030
Joined: Thu Oct 11, 2001 1:24 pm
Display name: Mat (SmartFTP)
Contact:

Re: local file get zeroed when source was renamed/deleted/moved

Post by mb » Mon May 28, 2007 6:17 am

Hello ..

Please post the complete log from the 2nd download attempt. And how do you download the file? Direct to Transfer Queue?

Regards,
-Mat
Last edited by mb on Mon May 28, 2007 6:18 am, edited 1 time in total.

arthurleu
Posts: 5
Joined: Wed Jun 28, 2006 4:19 pm

Re: local file get zeroed when source was renamed/deleted/moved

Post by arthurleu » Mon May 28, 2007 2:11 pm

Last edited by arthurleu on Mon May 28, 2007 2:12 pm, edited 1 time in total.

mb
Posts: 12030
Joined: Thu Oct 11, 2001 1:24 pm
Display name: Mat (SmartFTP)
Contact:

Re: local file get zeroed when source was renamed/deleted/moved

Post by mb » Wed May 30, 2007 12:17 pm

Thank you for the detailed description.

In the latest version (.40) the local file is now opened/created right before the first bytes arrive. Therefore an existing local file is not touched if the remote file doesn't exist.

I would appreciate if you have some time to test the new version:
https://www.smartftp.com/download

Thank you
-Mat
Last edited by mb on Wed May 30, 2007 12:29 pm, edited 1 time in total.

Locked