[TriLUG] FTP (Again...)

T. Bryan tbryan at python.net
Wed Nov 15 07:16:17 EST 2006


On Tuesday 14 November 2006 20:01, Phillip Rhodes wrote:
> Mark Freeze wrote:
> > Is there another solution?
> >
> > Can I quit adding stuff to this message?
>
> If that were my problem, I'd try to find an FTP server daemon that
> lets you "hook" code in to run whenever certain events occur.  Other
> than using some sort of semaphore, the FTP server's knowledge of
> the upload status is about as good as it gets, so it makes sense to
> let the server tell you - via a callbac -  when an upload
> completes.

Or, easier, an FTP daemon that hides the file in some way and then renames it 
once upload is complete.  Thus, from your cron job's perspective, the file 
doesn't exist until the upload is complete.  Of course, then the script that 
looks for the files may need to be run multiple times (to pick up late files) 
or may need to sleep/wait for all files to be uploaded.

I've never done this myself, but proftpd does have mod_xfer which adds a 
HiddenStor directive.  
http://www.proftpd.org/localsite/Userguide/linked/config_ref_HiddenStor.html

If you cannot switch to proftpd, perhaps that reference will help you find 
something equivalent in vsftpd.

---Tom




More information about the TriLUG mailing list