Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

About Proftpd and operating

Posted on 2004-04-09
5
Medium Priority
?
708 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 400 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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
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…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses

722 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