Monitor and FTP directory recursively for file uploads

Discussion in 'HOWTO-Related Questions' started by dpicella, May 27, 2009.

  1. dpicella

    dpicella New Member

    I am running a Fedora 10 Server with websites managed by ISPConfig 3.

    I have an account that will be loading files in an FTP directory. I need to send notifications (email would be fine or I could run a command) when new files are uploaded in the directory tree. I thought of making scripts to do this myself, but it seems that linux may have tools already...

    I ran accrosss a program called dnotify which apparently was adopted by some linux distributions for a time. I do not believe that it monitors recursively. It also seems that dnotify was replaced by and upgraded project called inotify at some point.

    On my server, neither of these are installed or available through the default package manager - yum. I would have to patch my kernel to do so. I am not sure it is worth the trouble if there are better tools to get the job done.

    Does anyone have any experience with this?

    Cheers!
     
  2. falko

    falko Super Moderator Howtoforge Staff

  3. dpicella

    dpicella New Member

    Great! That is just what I was looking for.

    I was able to install incron on Fedora 10 using
    Code:
    yum install incron
    I then started the incron daemon
    Code:
    service incrond start
    To turn on the daemon at boot
    Code:
    chkconfig incrond on
    I was able to install a monitor for new files in a directory that sends an email notice and it works great.

    There is more information about incron at:
    http://www.linux.com/archive/feature/144666

    The only problem I have is that it does not monitor recursively, but I can easily work around that now.

    Cheers!
     

Share This Page