Solved

About Proftpd and operating

Posted on 2004-04-09
5
701 Views
Last Modified: 2013-12-16
Dear all,
   Is it possible when the user have any ftp action such as delete and add file via ftp service, it will send a e-mail to a e-mail account.

   For example : David via ftp client connection Proftpd FTP Server. He uploads a document call "namelist.doc". After completed upload, there will send a e-mail to peter@abc.com mail box.

Thanks,

Tommy
0
Comment
Question by:tommyliu
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 44

Expert Comment

by:Karl Heinz Kremer
ID: 10795048
I don't know if there is an ftp server that does support this, you can however do this with a cronjob that scans the directory every 5 minutes and keeps a list of files it has already seen. If a new file arrives, you can send out an email alert.

0
 
LVL 1

Author Comment

by:tommyliu
ID: 10795123
Dear khkremer,

    Thanks you for your help but I think the task in not as same as your solution, I want to after upload completed, e-mail will auto send from propftpd server. Anyaway, thanks for you help

Tommy
0
 
LVL 40

Expert Comment

by:jlevie
ID: 10795554
I agree with khkremer that there's no built in mechanism within ProFTP (or any other FTP server I've seen) for doing this. It probably wouldn't be that difficult to modify the ProFTP source to do this, but that would be the only way to do it from within the FTP server.
0
 
LVL 44

Expert Comment

by:Karl Heinz Kremer
ID: 10796365
If you need to know when a file is completely uploaded, just store the file size as well. When you find a new file, you consider it not being there until you read the same file size twice. Only then would you send out the email notification.
0
 
LVL 3

Accepted Solution

by:
idt earned 100 total points
ID: 10800831
Here's a thought,  I use vsftpd and enable full logging,  

the out put is as:
Sun Apr  11 12:00:00 2004 [pid 28527] [username] OK LOGIN: Client "192.168.1.1"
Sun Apr  11 12:00:10 2004 [pid 28529] [username] OK DOWNLOAD: Client "192.168.1.1", "/some/path/to/a/file/foo", 13567504 bytes, 55.02Kbyte/sec

If you had a bash script that tailed -f on the log file, then parced it with some bash code, a little grep, and wee bit of awk, and a dash of sendmail, you could accomplish your task in a few minutes.

Daniel
0

Featured Post

Percona Live Europe 2017 | Sep 25 - 27, 2017

The Percona Live Open Source Database Conference Europe 2017 is the premier event for the diverse and active European open source database community, as well as businesses that develop and use open source database software.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

rdate is a Linux command and the network time protocol for immediate date and time setup from another machine. The clocks are synchronized by entering rdate with the -s switch (command without switch just checks the time but does not set anything). …
Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses

615 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question