Thread: Archiver
View Single Post
Old 10-07-2011, 06:04 PM  
Too much time...
Join Date: May 2005
Posts: 1,194

Hmm. Jeza if you get a chance, let me know what "features", or even propose an interface, you would like to see out of ioFTPD to help support whatever scripts your working on. The existing shared memory interface is pretty useful to adjust vfs perms, userfiles, etc, and there was some talk about providing a C# wrapper to make that accessible, but even the iTCL interface has a number of holes in it. I haven't prioritized filling them because no-one was complaining and I figured I'd get around to it when I needed the functionality in ioYil, but that was only going to be iTCL only originally. When I saw that exception stuff about cross drive moves a light bulb went off in my head that you will have the exact same problems ioYil will have...

If you want to move a directory tree to another drive you will have to do a copy/delete, which is trivial in C# to do, BUT if you want to actually be able to always delete the old directory you'll have to kick users in the old directory like nxtools does which is something you probably can't do now without access to the shared memory interface. Internally the RNFR/RNTO code for directory moves actually goes a step farther and locks the directories so nobody can enter the old dir as it's easy to see clients/bots get kicked and immediately restart. Now that I think about it I'm not sure if the internal code actually kicks users or just locks it so the next file can't be accessed because I was thinking about a slight of hand technique where I would automatically move users to the new dir if symbolic paths was enabled. Either way you'll also have to arrange to output something every 10-30 seconds if this is called from a site command to keep clients happy. Are you aware of the EXEC module line prefixed commands? You can enable non-buffered immediate output, change vfs perms on files/dirs, etc by just sending output back to the server and I believe you can take advantage of that via scheduled EXEC tasks as well if you need to change perms which I presume would be useful if you need to make the archived dirs read-only or something.

What I intend to do is either expose the directory locking stuff and/or the internal directory move stuff to iTCL for my use and I guess you wouldn't mind this in the future either, but if you can think of anything else you'd like to see please let me know. The only other hint I can give you is that internally ioFTPD takes special care to make sure that it copies over the .ioFTPD file before moving any files or subdirs. This guarantees that permission information is intact so the moved directory doesn't expose anything during the move and I thought you might want to make sure you do the same.
Yil is offline   Reply With Quote