Auto scan user every night

jazz1611

Well-Known Member
Jun 5, 2012
82
0
56
cPanel Access Level
Root Administrator
Hi,

I installed ClamAV and i dont see ClamAV scan in my server. How can i make ClamAV scan all user hosting every night ( 0AM ) and send alert email to my email when it scan completed.

Regards,

php-clamav | Free software downloads at SourceForge.net - PHP ClamAV - ClamAV Interface for PHP5 Scripts PHP-ClamAV is a PHP5 extension that allows to incorporate virus scanning features on your PHP5 scripts. It uses the Clam AV API for virus scanning.
PHP ClamAV will deny or prevent shell scripts when attacker upload file to hosting?
 
Last edited:

24x7server

Well-Known Member
Apr 17, 2013
1,907
95
78
India
cPanel Access Level
Root Administrator
To scan your server through ClamAV you will have to setup the cron on your server under the root user.

Also you can install LMD- Linux Malware Detect on your server and scan your server through LMD. You can configured the LMD with the mod_security
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,202
363
Hello :)

Could you let us know what method you used to install ClamAV? You should be able to setup a cron job as root that utilizes the "clamscan" utility. EX:

Code:
clamscan -ir /home -l /var/log/clamscan.log
Thank you.
 

quizknows

Well-Known Member
Oct 20, 2009
1,008
87
78
cPanel Access Level
DataCenter Provider
PHP ClamAV will deny or prevent shell scripts when attacker upload file to hosting?
I think configserver exploit scanner can scan files as they are uploaded using a custom modsecurity hook. CXS is a one time $50 cost if i remember right.

As far as clamscan, a cron like Michael suggested should work. If you don't get the e-mail you could also pipe the command to mail, like this:

Code:
clamscan -ir /home*/*/public_html/ | mail -s "subject" [email protected]
I do not recommend scanning all of /home/ as you will get a lot of false positives from spam e-mail files, and sometimes the easyapache source will trigger things like execute globals hits (usually more with maldet than clamscan).
 

inthukha

Well-Known Member
Jul 17, 2013
61
0
6
cPanel Access Level
Root Administrator
Wel if you are looking free so LMD and clamd is good but not so. CXS is a one time $50 cost and too good. even i m still thinking to purchase it because i myself uploaded the virus file in hosting account but both lmd and clamav didn't did anything with file. and i was :eek:
 

bou3lam

Active Member
Sep 29, 2009
36
1
58
hi, what is the correct syntax to put after the crontab -e command please :
clamscan -ir /home*/*/public_html/ | mail -s "subject" [email protected]
to run a daily scan at 1am
thanks