PDA

View Full Version : NTFS Junctions


Yil
09-29-2009, 09:00 PM
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.

o_dog
10-08-2009, 11:04 PM
symlinks for windows are crappy at best, don't focus on them since they are not resolved by the server. The symlink support is not even supported over networks on vista and windows 7. It's crap, dunno why they did it that way but ms is ms.