Jump to content


Photo

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


This topic has been archived. This means that you cannot reply to this topic.
3 replies to this topic

#1 arthurleu

arthurleu
  • Members
  • 5 posts

Posted 28 May 2007 - 04:11 AM

This is when I download the file and delete it after I downloaded it
[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)
Posted 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
[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)
Posted 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.

+- 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


#2 mb

mb

    Developer

  • Administrators
  • 11520 posts

Posted 28 May 2007 - 06: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

#3 arthurleu

arthurleu
  • Members
  • 5 posts

Posted 28 May 2007 - 02:11 PM

Hello ..

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

Regards,
-Mat


Both the Direct queue and Transfer queue yields the same result.

[14:55:55] SmartFTP v2.5.1005.36
[14:55:55] Resolving host name "xx.xxx.xx.xxx"
[14:55:55] Proxy: Resolving host name 127.0.0.1
[14:55:55] Connecting to xx.xxx.xx.xxx Port: 2262
[14:55:55] Proxy: Connecting to SOCKS5 proxy server 127.0.0.1 Port: 1351
[14:55:55] Proxy: Connected to proxy server. Sending connection request.
[14:55:55] Connected to xx.xxx.xx.xxx.
[14:55:55] 220 Servers identifying string
[14:55:55] USER xxxxx
[14:55:56] 331 Password required for xxxxx.
[14:55:56] PASS (hidden)
[14:55:56] 230-Last login was: 2007-05-28 14:51:07
[14:55:56] 230 User xxxxx logged in.
[14:55:56] SYST
[14:55:56] 215 UNIX Type: L8
[14:55:56] Detected Server Type: UNIX
[14:55:56] FEAT
[14:55:56] 211-Features:
[14:55:56]  MDTM
[14:55:56]  REST STREAM
[14:55:56]  SIZE
[14:55:56] 211 End
[14:55:56] PWD
[14:55:56] 257 "/" is current directory.
[14:55:58] CWD /Temp
[14:55:59] 250 CWD command successful
[14:55:59] PWD
[14:55:59] 257 "/Temp" is current directory.
[14:55:59] TYPE A
[14:55:59] 200 Type set to A
[14:55:59] PASV
[14:55:59] 227 Entering Passive Mode (xx,xxx,xx,xxx,206,126).
[14:55:59] Proxy: Resolving host name 127.0.0.1
[14:55:59] Opening data connection to xx.xxx.xx.xxx Port: 52862
[14:55:59] Proxy: Connecting to SOCKS5 proxy server 127.0.0.1 Port: 1351
[14:55:59] LIST -aL
[14:55:59] Proxy: Connected to proxy server. Sending connection request.
[14:55:59] 150 Opening ASCII mode data connection for file list
[14:55:59] 569 bytes transferred. (17.9 KB/s) (31 ms)
[14:55:59] 226 Transfer complete.
[14:56:17] TYPE I
[14:56:17] 200 Type set to I
[14:56:17] SIZE COPYING
[14:56:17] 213 17992
[14:56:17] MDTM COPYING
[14:56:17] 213 20070528030703
[14:56:17] PASV
[14:56:17] 227 Entering Passive Mode (xx,xxx,xx,xxx,206,136).
[14:56:17] Proxy: Resolving host name 127.0.0.1
[14:56:17] Opening data connection to xx.xxx.xx.xxx Port: 52872
[14:56:17] Proxy: Connecting to SOCKS5 proxy server 127.0.0.1 Port: 1351
[14:56:17] RETR COPYING
[14:56:17] Proxy: Connected to proxy server. Sending connection request.
[14:56:17] 150 Opening BINARY mode data connection for COPYING (17992 bytes)
[14:56:17] 17992 bytes transferred. (161 KB/s) (109 ms)
[14:56:18] 226 Transfer complete.
[14:56:18] MDTM COPYING
[14:56:18] 213 20070528030703
[14:56:18] Transfer successful.
Then I used another thread to change the name
[14:58:04] CWD /Temp
[14:58:05] 250 CWD command successful
[14:58:05] PWD
[14:58:05] 257 "/Temp" is current directory.
[14:58:05] RNFR COPYING
[14:58:05] 350 File or directory exists, ready for destination name.
[14:58:05] RNTO COPYING1
[14:58:05] 250 Rename successful
Then I start downloading with the original download thread
[14:59:40] SIZE COPYING
[14:59:40] 550 COPYING: No such file or directory
[14:59:40] File size check (SIZE) failed. File not found or permission denied.
[14:59:40] No rule matched. Default Action="Resume".
[14:59:40] PASV
[14:59:40] 227 Entering Passive Mode (xx,xxx,xx,xxx,206,200).
[14:59:40] Proxy: Resolving host name 127.0.0.1
[14:59:40] Opening data connection to xx.xxx.xx.xxx Port: 52936
[14:59:40] Proxy: Connecting to SOCKS5 proxy server 127.0.0.1 Port: 1351
[14:59:40] RETR COPYING
[14:59:40] Proxy: Connected to proxy server. Sending connection request.
[14:59:40] 550 COPYING: No such file or directory
[14:59:40] 0 bytes transferred. (0 bytes/s) (15 ms)
[14:59:40] MDTM COPYING
[14:59:40] 550 COPYING: No such file or directory
[14:59:40] Transfer failed. Use the Transfer Queue for automatic retries.

The File Exist Rule for both Direct / Queue is:
Smaller / No Matter / No Matter / Resume
Equal / No Matter / No Matter / Skip
Larger / No Matter / No Matter / Skip
Default Action = Resume

It appeared to me that SmartFTP attempted to resume/overwrite the file even though it does not have a filesize?

I also just tried adding the rule (didn't know there was the unknown option there before)
Unknown / No Matter / No Matter / Skip
[15:08:22] SIZE COPYING2
[15:08:22] 550 COPYING2: No such file or directory
[15:08:22] File size check (SIZE) failed. File not found or permission denied.
[15:08:22] Rule "IF Destination Time=No Matter AND Size=Unknown AND Transfer=No Matter THEN Skip" matched. Action="Skip".
[15:08:22] Skipping file "COPYING2". Reason: User action.
[15:08:22] Transfer successful.
OK, skipping worked but it looked like the "resume" function was not coded to handle inaccessible file?

#4 mb

mb

    Developer

  • Administrators
  • 11520 posts

Posted 30 May 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:
http://www.smartftp....get/SFTPNSI.exe

Thank you
-Mat