View Single Post
Old 12-01-2009, 04:36 PM  
Too much time...
Join Date: May 2005
Posts: 1,194

I think I taught ioFTPD about NTFS junctions/symlinks. You can now keep the current functionality which is to just ignore them entirely which might be needed for compatibility and in case the new features don't work right (IGNORE option). Or you can let the server keep file information just once for the target directory and create a placeholder link for the junction/symlink (SHARE option). For servers with tons of links this should reduce memory usage and it helps the server keep directory timestamps up to date and to track changes better. There is also another mode which I find particularly interesting. Not only does the server know about the links but it attempts to show them as links in listings by dynamically reverse resolving the target directory to a VFS path (SYMLINK option). This has two advantages to my mind. You can delete links in FTP clients like Flash without it trying to delete the contents of the directory itself, and it's obvious that you are dealing with a link and not a directory. The fake link itself has the same owner/timestamps/etc as the target directory automatically.

No matter what option you use, broken symlinks are now no longer hidden in listings and if you are a VM flagged user it will show you the real path that is missing as the target of the link. Permissions are set to 000 to make broken links stand out as well.

If you are using the SHARE/SYMLINK options you can also enable a safety feature which prevents accessing files/directories that are not explicitly exported via the VFS file. Thus a NTFS junction/symlink to c:\windows wouldn't work since it's unlikely you actually put that into a VFS file. Sort of a safety feature for badly formed links. This was never a worry with ioFTPD symlinks because they have to be valid VFS paths already.

I've got a ton of other changes, and a lot of testing still to do. I'll likely try to finish things up sometime next week and hopefully get a few of you to try out the new features as I'll need help testing so many low level internal changes.
Yil is offline   Reply With Quote