Thread: NTFS Junctions
View Single Post
Old 09-29-2009, 09:00 PM  
Yil
Too much time...
 
Join Date: May 2005
Posts: 1,194
Default NTFS Junctions

When the target of an NTFS junction is deleted but the junction itself isn't the junction becomes "tricky". If the junction is already in the cache then it's still visible to the server and it will show the now non-existent contents although they will all be inaccessible. If the junction isn't in the cache then it will disappear from directory listings and be inaccessible.

I don't use junctions, but I know o_dog in particular does so I'm looking for feedback on what do when the target disappears. A fake place-holder directory can be included in listings but should it look like a regular directory, a symbolic link (if so what target should show up?), or maybe a directory with no perms like d--------- to highlight its broken nature? How often should the server re-test the junction to see if the target has re-appeared? I'm guessing it shouldn't if the timestamp hasn't changed.

Should all junctions be marked in some way to differentiate them? With a directory flag like rwX or something now that I've freed those bits up?

I obviously have a bit of work to get the caching correct when the target directory changes because it appears the timestamp on the junction isn't updated so it doesn't look modified to the server. Do people notice the stale directory contents via the junction? I think I see an easy fix once I realize I'm dealing with a junction and need to examine the target directory timestamp instead.

Chime in with anything I'm missing or what should be going on. I'm still running XP so no symlink support but I'm guessing they should be handled the same way as junctions so far as the client goes.
Yil is offline   Reply With Quote