Clamav Full Scan Report
Step 1
vi /root/clamscan.sh
#!/bin/bash
log="/var/log/clamav/clamscan-`date +%F`.log"
rm -fr $log
/usr/bin/clamscan -i -r --quiet / -l $log
cat $log | grep -v "WARNING:" | mail -s "Clamscan Report" admin@xxx.com
chmod 755 $log
chmod +x /root/clamscan.sh
Make the full scan report script (only scan without action in whole system "/")
Step 2
You can skip it if do not want to show in web.
vi /etc/httpd/conf/httpd.conf
Alias /clamav "/var/log/clamav/"
<Directory "/var/log/clamav">
Options Indexes MultiViews
AllowOverride All
Order allow,deny
Allow from all
AuthType Basic
AuthName "Authentication"
AuthUserFile /etc/web_passwd
Require valid-user
</Directory>
htpassed -mb(-cmb) /etc/web_passwd admin password
/etc/init.d/httpd reload
Make for report alias and web password in the apache.
Step 3
crontab -e
## clamav update
0 5 * * * /usr/bin/freshclam &> /dev/null
## clamscan full scan
0 0 * * * /root/clamscan.sh &> /dev/null
## delete over 30 days clamav full scan log
0 5 * * * /usr/bin/find /var/log/clamav -mtime +30 -exec rm {} \; &> /dev/null
Add in cron job.
Server is hosted by Alanstudio
Linux Operating System
Recommend screen resolution 1024 x 768 / IE / FireFox
Alan Studio © 2007 by Alan Cheung Hin Lun. All rights reserved.
|