Solved

About Proftpd and operating

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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
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.

809 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