Web Hosting Talk







View Full Version : Random Questions


raqman
05-11-2002, 10:19 PM
Working on setting up a new script of mine and was wondering if any one could advise me on how to do the following on my ensim box...

1) How do I make Crontab run the following? I'm new to it and don't really know how to add commands like this.

0 * * * * ksh -c "find ~ftp/pub/incoming -type f -size +10485760c -exec ls -l {} \; >> /var/adm/log/incoming.log"

0 0 * * * ksh -c "find ~ftp/pub/incoming -type f -mtime +30 -exec rm -f {} \; 2>&1 > /dev/null"

2) Is there an easy way to set an proftp quota for users to 25 megabytes? I played with proftpd.conf but found nothing.

3) Is there an easy way to monitor the bandwidth of user accounts in the base html dir of a domain, and chmod 0 the folders that are excessively used?

Thanks guys.

webx
05-12-2002, 04:19 AM
I don't know about ensim :o but you can do this on unix:

#crontab -e

and type both lines in the editor window :)

3) there is no easy way ;) you will need to write some script to calculate the bandwidth used by that directory (vritual host?) through some log analysis tool e.g. analog and based on result take the decision of chmod or not :D