Solved

About Proftpd and operating

Posted on 2004-04-09
5
669 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Network Interface Card (NIC) bonding, also known as link aggregation, NIC teaming and trunking, is an important concept to understand and implement in any environment where high availability is of concern. Using this feature, a server administrator …
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…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

744 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now