Go Back   FlashFXP Forums > >

General Discussion Need help? Have a problem? Let us help you. Bug reports and feature requests should be made using the Bug Tracker or Feature Tracker

Closed Thread
 
Thread Tools Rate Thread Display Modes
Old 10-12-2015, 03:15 AM   #1
andreas
Senior Member
FlashFXP Beta Tester
 
Join Date: Jul 2002
Posts: 484
Default Directory listing not updating corectly

1. Create a directory.
2. Let ftp session (session1) timeout.
3. Use an other session to delete the directory.
4. Press F5 to session1.
5. File listing will update to a valid path
6. Directory listing will show the deleted path

Flashfxp version 5.2.0.3883
andreas is offline  
Old 10-12-2015, 07:52 AM   #2
bigstar
FlashFXP Developer
FlashFXP Administrator
ioFTPD Beta Tester
 
bigstar's Avatar
 
Join Date: Oct 2001
Posts: 8,012
Default

What FTP server software?

I am not seeing this issue when I attempt to reproduce it.

Can you please include a copy of the session status text.

Can you also turn on debug caching using this raw command /debug cache 1 first and then you can use /debug cache 0 to turn it off once you've completed the test.
bigstar is offline  
Old 10-12-2015, 08:13 AM   #3
andreas
Senior Member
FlashFXP Beta Tester
 
Join Date: Jul 2002
Posts: 484
Default

- linux proftpd

- Here is the cache:

Code:

[15:58:25] [R] Connecting to ftp.xxx.nu -> DNS=xxxx.xxx.nu IP=xxxIPxxx PORT=21
[15:58:25] [R] Connected to ftp.xxx.nu
[15:58:25] [R] 220 GodLike FTP Server
[15:58:25] [R] USER userakos
[15:58:25] [R] 331 Password required for userakos
[15:58:25] [R] PASS (hidden)
[15:58:25] [R] 230 Welcome!!!
[15:58:25] [R] SYST
[15:58:25] [R] 215 UNIX Type: L8
[15:58:25] [R] FEAT
[15:58:25] [R] 211-Features:
[15:58:25] [R]  MDTM
[15:58:25] [R]  MFMT
[15:58:25] [R]  TVFS
[15:58:25] [R]  UTF8
[15:58:25] [R]  MFF modify;UNIX.group;UNIX.mode;
[15:58:25] [R]  MLST modify*;perm*;size*;type*;unique*;UNIX.group*;UNIX.mode*;UNIX.owner*;
[15:58:25] [R]  LANG en-US*
[15:58:25] [R]  SITE MKDIR
[15:58:25] [R]  SITE RMDIR
[15:58:25] [R]  SITE UTIME
[15:58:25] [R]  SITE SYMLINK
[15:58:25] [R]  REST STREAM
[15:58:25] [R]  SITE COPY
[15:58:25] [R]  SIZE
[15:58:25] [R] 211 End
[15:58:25] [R] OPTS UTF8 ON
[15:58:25] [R] 200 UTF8 set to on
[15:58:25] [R] PWD
[15:58:26] [R] 257 "/" is the current directory
[15:58:26] [R] CWD /
[15:58:26] [R] 250 CWD command successful
[15:58:26] [R] PWD
[15:58:26] [R] 257 "/" is the current directory
[15:58:26] [R] PASV
[15:58:26] [R] 227 Entering Passive Mode (xx,xx,xx,xx,188).
[15:58:26] [R] Opening data connection IP: xxxIPxxx PORT: 54460
[15:58:26] [R] MLSD
[15:58:26] [R] 150 Opening ASCII mode data connection for MLSD
[15:58:26] [R] 226 Transfer complete
[15:58:26] (debug) [cache :: add :: new] /
[15:58:26] [R] List Complete: 655 bytes in 0,07 seconds (0,6 KB/s)
[15:58:27] [R] CWD andreas
[15:58:27] [R] 250 CWD command successful
[15:58:27] [R] PWD
[15:58:27] [R] 257 "/andreas" is the current directory
[15:58:27] [R] PASV
[15:58:27] [R] 227 Entering Passive Mode (xx,xx,xx,xx,xx,195).
[15:58:27] [R] Opening data connection IP: xxxIPxxx PORT: 18627
[15:58:27] [R] MLSD
[15:58:27] [R] 150 Opening ASCII mode data connection for MLSD
[15:58:27] [R] 226 Transfer complete
[15:58:27] (debug) [cache :: add :: new] /andreas/
[15:58:27] [R] List Complete: 3 KB in 0,11 seconds (3,6 KB/s)
[15:58:28] [R] CWD test11111
[15:58:28] [R] 250 CWD command successful
[15:58:28] [R] PWD
[15:58:28] [R] 257 "/andreas/test11111" is the current directory
[15:58:28] [R] PASV
[15:58:28] [R] 227 Entering Passive Mode (xx,xx,xx,xx,xx,216).
[15:58:28] [R] Opening data connection IP: xxxIPxxx PORT: 23768
[15:58:28] [R] MLSD
[15:58:28] [R] 150 Opening ASCII mode data connection for MLSD
[15:58:28] [R] 226 Transfer complete
[15:58:28] (debug) [cache :: add :: new] /andreas/test11111/
[15:58:28] [R] List Complete: 219 bytes in 0,11 seconds (0,2 KB/s)
[16:04:44] [R] Network Error (10054): Connection reset by peer
[16:04:44] [R] Connection lost: ftp.xxx.nu (Duration: 6 minutes 18 seconds / Idle: 6 minutes 15 seconds)


>>> HERE DELETE THE DIRECTORY USING AN OTHER SESSION <<<<


[16:06:33] [R] Connecting to ftp.xxx.nu -> DNS=xxxx.xxx.nu IP=xxxIPxxx PORT=21
[16:06:33] [R] Connected to ftp.xxx.nu
[16:06:33] [R] 220 GodLike FTP Server
[16:06:33] [R] USER userakos
[16:06:33] [R] 331 Password required for userakos
[16:06:33] [R] PASS (hidden)
[16:06:33] [R] 230 Welcome!!!
[16:06:33] [R] SYST
[16:06:33] [R] 215 UNIX Type: L8
[16:06:33] [R] FEAT
[16:06:33] [R] 211-Features:
[16:06:33] [R]  MDTM
[16:06:33] [R]  MFMT
[16:06:33] [R]  TVFS
[16:06:33] [R]  UTF8
[16:06:33] [R]  MFF modify;UNIX.group;UNIX.mode;
[16:06:33] [R]  MLST modify*;perm*;size*;type*;unique*;UNIX.group*;UNIX.mode*;UNIX.owner*;
[16:06:33] [R]  LANG en-US*
[16:06:33] [R]  SITE MKDIR
[16:06:33] [R]  SITE RMDIR
[16:06:33] [R]  SITE UTIME
[16:06:33] [R]  SITE SYMLINK
[16:06:33] [R]  REST STREAM
[16:06:33] [R]  SITE COPY
[16:06:33] [R]  SIZE
[16:06:33] [R] 211 End
[16:06:33] [R] OPTS UTF8 ON
[16:06:33] [R] 200 UTF8 set to on
[16:06:33] [R] PWD
[16:06:33] [R] 257 "/" is the current directory
[16:06:33] [R] CWD /andreas/test11111/
[16:06:34] [R] 550 /andreas/test11111/: No such file or directory
[16:06:34] (debug) [cache :: remove :: not-cached :: 8 ] /
[16:06:34] [R] CWD /
[16:06:34] [R] 250 CWD command successful
[16:06:34] [R] PWD
[16:06:34] [R] 257 "/" is the current directory
[16:06:34] [R] PASV
[16:06:34] [R] 227 Entering Passive Mode (xx,xx,xx,xx,xx,156).
[16:06:34] [R] Opening data connection IP: xxxIPxxx PORT: 62364
[16:06:34] [R] MLSD
[16:06:34] [R] 150 Opening ASCII mode data connection for MLSD
[16:06:34] [R] 226 Transfer complete
[16:06:34] (debug) [cache :: add :: new] /
[16:06:34] [R] List Complete: 655 bytes in 0,12 seconds (0,6 KB/s)
I attach an image from this point
Attached Thumbnails
Directory listing not updating corectly-error-png  
andreas is offline  
Old 10-12-2015, 02:53 PM   #4
bigstar
FlashFXP Developer
FlashFXP Administrator
ioFTPD Beta Tester
 
bigstar's Avatar
 
Join Date: Oct 2001
Posts: 8,012
Default

Thank you.

When I conducted my tests; I was creating a sub-folder within the root location, so on reconnect the root was being refreshed and everything appeared to work correctly.

However in your case the sub-folder is being created within another sub-folder located in root and in this case the cache/folder of the parent is not refreshed.

The problem is that in most cases its not 100% clear why the CWD failed. What I mean by that is some FTP servers return 550 permission denied, or 550 not found, 550 Unable to handle command, etc.

Some FTP servers may use other response codes as well and we rely on these response codes to determine our action.
99% of the time when the CWD command fails we just accept the failure and move on.

However in this specific situation there is something more we can do. Since we know that we had permission to the folder at some point and now we don't it's fairly safe to assume that the folder was moved, renamed, or deleted. (Permissions may have been changed but that's the least likely)

What I can do is after reconnect if the CWD fails then remove the folder from the tree, file list, and cache.

I just finished these changes but I need to do some more testing, once I wrap that up I'll give you a link with the new build.
bigstar is offline  
Old 10-13-2015, 03:39 AM   #5
andreas
Senior Member
FlashFXP Beta Tester
 
Join Date: Jul 2002
Posts: 484
Default

Or just update the directory listing in any case, not showing what is in the cache.
andreas is offline  
Old 10-13-2015, 07:14 AM   #6
bigstar
FlashFXP Developer
FlashFXP Administrator
ioFTPD Beta Tester
 
bigstar's Avatar
 
Join Date: Oct 2001
Posts: 8,012
Default

Aside from the cache expire after setting, refresh cache on transfer setting, and a manual refresh. A directory listing will remain cached for the current session until an operation is performed in the folder that invalidates the cache.

Since the folder is being deleted by the second session only the cache on the second session is updated, the cache for the first session is not touched.

FlashFXP doesn't know that the cache for the first session is stale, so it doesn't know to refresh from the server.

And this is what I am working to change, so if changing to a folder fails on reconnect then its safe to assume that the cache for the parent of said folder is also invalid and should be refreshed from the server.
bigstar is offline  
Old 10-13-2015, 09:24 AM   #7
andreas
Senior Member
FlashFXP Beta Tester
 
Join Date: Jul 2002
Posts: 484
Default

I think is simpler than that.

You try to enter a path that does not exist or you dont have permission or you cant enter for any reason.
The right window (files) moves to a path that you have access or to the root directory.
Obviously the left window remains to wrong path: you just can move both windows to the same path & of course clear the cache.

Rember that you have connected again after a timeout. After a timeout cache should be cleaned?

Last edited by andreas; 10-14-2015 at 04:29 AM.
andreas is offline  
Old 10-14-2015, 08:11 AM   #8
bigstar
FlashFXP Developer
FlashFXP Administrator
ioFTPD Beta Tester
 
bigstar's Avatar
 
Join Date: Oct 2001
Posts: 8,012
Default

Quote:
Rember that you have connected again after a timeout. After a timeout cache should be cleaned?
No, after a connection timeout the cache isn't cleared; There's no reason to clear cache under this condition.

Update:

I am working on some unrelated issues that I've discovered while testing the cache system and its taking much longer than I expected.
bigstar is offline  
Old 10-18-2015, 12:58 PM   #9
bigstar
FlashFXP Developer
FlashFXP Administrator
ioFTPD Beta Tester
 
bigstar's Avatar
 
Join Date: Oct 2001
Posts: 8,012
Default

Here's a new build you can test, I am still testing all my changes, so please let me know if you find something that you think is not right.

Download ffxp5.2.0.3885.zip

Unzip the flashfxp.exe into your FlashFXP program folder and overwrite the existing file.

This new build should address the original problem when the folder no longer exists on reconnect, and it makes several improvements to the caching system, when a file is deleted, renamed, moved, etc we update the information within the cache whenever possible and eliminate forcing a refresh from the server when it can be avoided.
bigstar is offline  
Closed Thread

Tags
ftp, directory, listing, session, session1, path, show, press, deleted, valid

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 07:19 AM.

Parts of this site powered by vBulletin Mods & Addons from DragonByte Technologies Ltd. (Details)