I need to be notified and perform other tasks when a file is uploaded onto my server. Is there any method/system call that will be triggered or anything that i can hook onto ? I'm using vsftpd as my ftp server.

1 Answer 1


You can approach this by using something more generic than a FTP hook (which will also allow it to scale if the users uses SCP, SFTP or even SSH using a text editor): inotify.

There are many languages that support this, but here's a Python API: https://github.com/seb-m/pyinotify/wiki

This would allow you to watch a directory, and when it changes, act on that information.

There is also Python Watchdog: http://code.google.com/p/python-watchdog

  • Thanks. Am looking into this. Any idea which event will be triggered at the end of a file transfer ?
    – rdsoze
    Sep 25, 2012 at 8:33
  • FTP clients normally upload files in with a filename like ".something" and rename them when they're done, so you can just ignore hidden files if that's the case and just wait for the 'real' file to be created.
    – Jay
    Sep 25, 2012 at 10:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.