0

i'm using vsftp on ubuntu 9.04 Is it possible to send an email whenever a user uploads a file to a particular folder using ftp?

2 Answers 2

2

I don't think vsftpd itself has anything that will do this for you. Most likely you'll have to write / find a script that will watch a particular directory for files, and email it from there.

0
1

You can enable logging for vsftp and then look for files being uploaded in taget directory.

 #!/bin/sh

 tail -F /var/log/vsftpd.log | while read line; do
     if echo "$line" | grep -q '/path/to/target/folder'; then
          echo "File is uploaded" | /usr/sbin/sendmail "[email protected]";
     fi
 done
1
  • what if the vsftp log rotates - the script will go idle
    – TSG
    Nov 25, 2018 at 13:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .