[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Directory surveillance or synchronization

Posted on 2004-08-18
4
Medium Priority
?
219 Views
Last Modified: 2012-05-05
Hello,
I have this situation I'd like help on : during a project development we are granting someone FTP access to a subdirectory on our Linux server. However for several reasons we'd like to be aware of all activity in that workspace and also have a backup solution, so that for example if a file is uploaded and then removed we'd still be aware of that and have a copy of the file. I had in mind to use rsync and/or a tool detecting changes inside that dir, but I'm not sure how that would translate ?
Making a copy of the dir to another directory with a timestamp every minute would not be too rational even though disk space is not an issue...Could that idea be combined with a "change detection" tool (tripwire ?) triggering the backup/copy only when changes occur ?
Regards,
 
0
Comment
Question by:Denisvt
[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
  • 2
  • 2
4 Comments
 
LVL 2

Expert Comment

by:xscousr
ID: 11840840
pure-ftpd allows you to run a script after each file is uploaded. With this feature you could write a script which backed up or copied the files as they came up.

http://www.pureftpd.org/index.shtml

run pure-ftpd as your ftp server and the second daemon pure-uploadscript and use something like

#!/bin/bash
#
# copy uploaded file and email a notification
#
DATESTAMP=`date +%Y%m%d`
TIMESTAMP=`date +%Y%m%d_%H%M_%S`
notifymail="/tmp/notifymail"
archive="/var/archive"
log="/var/log/upload-${TIMESTAMP}.log"
upload="$1"
fname="$1"
        if [ $var1 = usertowatch ]; then
        chmod g+rwx $upload
        cp $upload $archive
        echo "File Uploaded at $TIMESTAMP" >$notifymail"
        echo " ">>$notifymail
        echo "Name                            Size" >>$notifymail"
        echo " " >>$notifymail
        ls -lh $upload | awk ' { print $9 "         " $5 }' >>$notifymail
        mail -s "New File uploaded to FTP" alert@domain.com <$notifymail
        rm $notifymail

fi

0
 
LVL 3

Author Comment

by:Denisvt
ID: 11841479
Right now the server we use runs ProFTPD, would you solution require that we install that other FTP server and/or replace our current one ?
I guess our contact has to use that server so that the script can be triggered ?

0
 
LVL 2

Accepted Solution

by:
xscousr earned 375 total points
ID: 11841789
you don't need to replace ProFTPD. Just for this project you could run pure-ftpd on a different port and have the developer use it.
 (yes it is the only ftp daemon i have found that has this ability to lauch a script upon receiving a file)
0
 
LVL 3

Author Comment

by:Denisvt
ID: 12134267
Thanks.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Have you ever been frustrated by having to click seven times in order to retrieve a small bit of information from the web, always the same seven clicks, scrolling down and down until you reach your target? When you know the benefits of the command l…
The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

649 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