Solved

About Proftpd and operating

Posted on 2004-04-09
5
682 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
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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
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.:
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

777 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