[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-users] FTP Admin Question



This only works if you _trust_ all the binaries that are uploaded.
Drop the following shell script into /etc/cron.daily and chmod 755 it.

#!/bin/bash
# quick and dirty hack

src=/home/sites/home/ftp/incoming
dst=/home/sites/home/ftp/pub

# This really isn't the best way to do this
cnt=`ls -1R $src | wc -l`

# makes sure if file names already exists it doesn't get blasted
/bin/mv --backup=numbered $src/* $dst

echo "Moved around $cnt files into pub" | mail admin


Jeff-


> Ok Ill ask again. didn't get any responses last time. What do you do when a
> user up loads a File to an FTP servers incoming dir.
> I've created a dir named /pub under the sites ftp dir and move the files
> from /incoming to /pub manually after a user uploads. Is there a better way
> to do this as we are compiling a Shareware FTP server and the uploads will
> be HUGE! Is there anyway to show the # of Uploads to the /incoming directory
> in a daily report that is emailed to the ADMIN.



> _______________________________________________
> cobalt-users mailing list
> cobalt-users@xxxxxxxxxxxxxxx
> To Subscribe or Unsubscribe, please go to:
> http://list.cobalt.com/mailman/listinfo/cobalt-users