Jump to content


Photo

"File Exists" Rules not followed


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

#1 J_SysAdmin

J_SysAdmin
  • Members
  • 7 posts

Posted 15 August 2007 - 06:01 PM

Summary
For filenames such as "7780 Chat.mp3" the "File Exist" rules seem to be ignored, and the file is downloaded regardless.

Detail
Quick Connect favourite used for downloads. Set that favourite's Properties | Transfer | File Exists | File Exist Queue > Use Favorite's Settings | Edit Rules and use "Restore Defaults". Also enable "File exist action based on the comparison between hash values."

Use that QC Favourite to select a whole directory to download, select local destination and synchronisation as "One Way".

Set schedule to recur every 1 day (though this may not be relevant).

File exist rules are properly followed for almost all files that match, but apparently matching files whose names start with digits seem to be downloaded every single time, regardless of whether they match or not.

Environment
+- System -----------------------------
Microsoft Windows XP Professional
Service Pack 2 (Build 2600)

CPU Speed : 2992 MHz
Total Memory : 1014 MB
Free Memory : 343 MB

+- SmartFTP ---------------------------
Version : 2.5.1006.13
Time Stamp : 2007-07-27 16:41:07
Platform : x86

+- Application DLL --------------------
sfFTPLib.dll : 1.5.9.26
sfFavorites.dll : 1.0.2.13
SmartHook.dll : 1.0.2.2

+- Language ---------------------------
SmartFTP.exe : 2.5.1006.13

+- Internet Explorer ------------------
Version : 6.0.2900.2180

+- Winsock ----------------------------
Winsock : 2.2


I hope I have provided everything you need. If not, please do feel free to post requesting more information.

Many thanks in advance.

J_SysAdmin

#2 mb

mb

    Developer

  • Administrators
  • 11520 posts

Posted 23 August 2007 - 11:59 AM

Hello ..

Thank you for your report. Unfortunately I'm unable to reproduce it:

This is the log from the 2nd download of the same file:

[13:51:36] TYPE I
[13:51:36] 200 Type set to I
[13:51:36] SIZE 7780 Chat.mp3
[13:51:36] 213 50
[13:51:36] MDTM 7780 Chat.mp3
[13:51:36] 213 20070823114850
[13:51:36] Source File: Size=50, SizeUnit=Byte, Time=2007-08-23T11:48:50, TimeFormat=Exact
[13:51:36] Destination File: Size=50, SizeUnit=Byte, Time=2007-08-23T11:48:50, TimeFormat=Exact
[13:51:36] Rule "IF Destination Time=Equal AND Size=Equal AND Transfer=No Matter THEN Skip" matched. Action="Skip".
[13:51:36] Skipping file "7780 Chat.mp3". Reason: User action.

As you can see the file is ignored.

Are you sure that you are using the correct favorite with the correct File Exist settings? Because I noticed that some of my favorites have no rules in the Queue - File Exist settings.

The file name is not taken into account when SmartFTP processes the file exist rules.

Regards,
Mat
SmartFTP

#3 J_SysAdmin

J_SysAdmin
  • Members
  • 7 posts

Posted 23 August 2007 - 01:25 PM

Mat:

Are you sure that you are using the correct favorite with the correct File Exist settings? Because I noticed that some of my favorites have no rules in the Queue - File Exist settings.

Yes: I am using a scheduled recurring download. When I right-click the item in the Transfer Queue and choose Properties, in the grey Source field I can click the Properties icon (for that favourite) and click through to Transfer | File Exists and File Exist Queue does show Use Favorite's Settings and Edit Rules does show the four default rules.

I think I may however have discovered the problem. Here is the log from a repeat download:

[14:12:10] SIZE 7780 Chat.mp3
[14:12:10] 213 6705661
[14:12:10] MDTM 7780 Chat.mp3
[14:12:10] 501 invalid date
[14:12:10] Obtaining file information (size/date) from directory listing.
[14:12:10] TYPE A
[14:12:10] 200 Type set to ASCII.
[14:12:10] PASV
[14:12:11] 227 Entering Passive Mode (aaa,bbb,ccc,ddd,225,245).
[14:12:11] Opening data connection to aaa.bbb.ccc.ddd Port: 57845
[14:12:11] MLSD
[14:12:11] 150 Opening ASCII data connection for directory listing
[14:12:11] 2322 bytes transferred. (12.0 KB/s) (188 ms)
[14:12:11] 226 transfer complete
[14:12:11] Source File: Size=6705661, SizeUnit=Byte, Time=1601-01-01T00:00:00, TimeFormat=Unknown
[14:12:11] Destination File: Size=6705661, SizeUnit=Byte, Time=2007-08-14T15:28:34, TimeFormat=Exact
[14:12:11] No rule matched. Default Action="Overwrite".
[14:12:11] TYPE I
[14:12:12] 200 Type set to IMAGE.
[14:12:12] PASV
[14:12:12] 227 Entering Passive Mode (aaa,bbb,ccc,ddd,225,249).
[14:12:12] Opening data connection to aaa.bbb.ccc.ddd Port: 57849
[14:12:12] RETR 7780 Chat.mp3
[14:12:12] 150 Opening BINARY data connection for 7780 Chat.mp3 (6705661 bytes)
[14:14:30] 226 transfer complete
[14:14:30] 6705661 bytes transferred. (47.4 KB/s) (00:02:18)
[14:14:30] MDTM 7780 Chat.mp3
[14:14:30] 501 invalid date

[For privacy I have obfuscated the actual IP address in question with aaa.bbb.ccc.ddd.]

The time of the source file appears to be invalid, hence none of the rules match, so the file is downloaded anyway, as this is the default action.

I am sorry to have taken up your time with this, but thank you anyway for pointing me in the right direction. Presumably I shall have to take this up with the operator of the FTP server in question. Alternatively, I suppose I could relax the file exists rules a little for this site to ignore the time aspects?

Thanks again.

#4 mb

mb

    Developer

  • Administrators
  • 11520 posts

Posted 23 August 2007 - 01:34 PM

Thank you for the follow up. Can you post the raw directory listing of this directory? Right-click on it and select "Show Raw Listing".

This will well you what exactly the server returns for the date of this file. I assume it returns no date or an invalid one.

Regards,
Mat
SmartFTP

#5 J_SysAdmin

J_SysAdmin
  • Members
  • 7 posts

Posted 23 August 2007 - 02:31 PM

Interesting. Here it is. Dates look OK to my (untrained) eye. I wonder why it's not working properly then.

size=0;type=cdir;perm=fdelcmp;create=20070313215218;modify=20070608141208; .
size=0;type=pdir;perm=fdelcmp;create=20070313215218;modify=20070608141208; ..
size=6631471;type=file;perm=fdrwa;create=20070313215602;modify=20070313215617; 7733 Chat.mp3
size=9099520;type=file;perm=fdrwa;create=20070313215617;modify=20070313215636; 7736 Chat.mp3
size=8380630;type=file;perm=fdrwa;create=20070313215733;modify=20070313215753; 7737 Chat.mp3
size=5300271;type=file;perm=fdrwa;create=20070313215756;modify=20070313215805; 7739 Chat.mp3
size=4855146;type=file;perm=fdrwa;create=20070326152356;modify=20070326152452; 7747 Chat.mp3
size=4870820;type=file;perm=fdrwa;create=20070326152452;modify=20070326152538; 7748 Chat.mp3
size=5147718;type=file;perm=fdrwa;create=20070326152538;modify=20070326152601; 7750 Chat.mp3
size=5233922;type=file;perm=fdrwa;create=20070409173230;modify=20070409173251; 7751 Chat.mp3
size=6042673;type=file;perm=fdrwa;create=20070409173252;modify=20070409173325; 7753 Chat.mp3
size=4138869;type=file;perm=fdrwa;create=20070409174056;modify=20070409174106; 7756 Chat.mp3
size=3374526;type=file;perm=fdrwa;create=20070409174106;modify=20070409174117; 7757 Chat.mp3
size=4689530;type=file;perm=fdrwa;create=20070409174118;modify=20070409174130; 7759 Chat.mp3
size=5822722;type=file;perm=fdrwa;create=20070409174130;modify=20070409174144; 7760 Chat.mp3
size=3202645;type=file;perm=fdrwa;create=20070413140857;modify=20070413140903; 7762 Chat.mp3
size=4965906;type=file;perm=fdrwa;create=20070413140904;modify=20070413140917; 7765 Chat.mp3
size=4802902;type=file;perm=fdrwa;create=20070413140918;modify=20070413140927; 7769 Chat.mp3
size=5946020;type=file;perm=fdrwa;create=20070413140928;modify=20070413140936; 7770 Chat.mp3
size=7006591;type=file;perm=fdrwa;create=20070413212054;modify=20070413212103; 7772 Chat.mp3
size=7806461;type=file;perm=fdrwa;create=20070413212103;modify=20070413212113; 7773 Chat.mp3
size=5873922;type=file;perm=fdrwa;create=20070502194242;modify=20070502194249; 7777 Chat.mp3
size=6383310;type=file;perm=fdrwa;create=20070502194249;modify=20070502194257; 7778 Chat.mp3
size=6705661;type=file;perm=fdrwa;create=20070502194258;modify=20070502194306; 7780 Chat.mp3
size=5626883;type=file;perm=fdrwa;create=20070608141132;modify=20070608141140; 7781 Chat 23.mp3

#6 mb

mb

    Developer

  • Administrators
  • 11520 posts

Posted 23 August 2007 - 03:11 PM

Hello ..

Yep the dates are okay in the MLSD listing. Any chance I can get temporary access to the FTP server?

Regards,
Mat

#7 J_SysAdmin

J_SysAdmin
  • Members
  • 7 posts

Posted 23 August 2007 - 03:30 PM

I'm afraid probably not. I do not have admin access to the server as I do not own or operate it. Is there something you would like me to try on that server (providing it does not change anything)? Or a message I could pass to the server's administrator on how to fix something?

#8 mb

mb

    Developer

  • Administrators
  • 11520 posts

Posted 23 August 2007 - 04:34 PM

Hello ..

1. The FTP server software doesn't implement the MDTM command correctly. It assumes that the first number is the time of the file.
[14:12:10] MDTM 7780 Chat.mp3
[14:12:10] 501 invalid date

The correct syntax can be found in Section 3 of the RFC: http://www.networkso...rfc/rfc3659.txt
The syntax for the MDTM command is:
mdtm = "MdTm" SP pathname CRLF

Therefore "7780 Chat.mp3" should be interpreted as the path by the server.

2. Without access to the FTP server we are not willing to debug this any further.

Regards,
Mat
SmartFTP