ClamAV is a anti-virus software that detects various malicious softwares and viruses. It can also be installed and configured in front of a mail server to scan emails. It provides command line scanning and automatic database update.
You can install ClamAV on a cPanel server from WHM as well as via SSH.
1) Login to WHM and goto the cPanel section2) click Manage Plugins3) select the checkbox "Install and Keep Updated" in ClamAV section.4) Click Save at the bottom of the page.
It will take a few minutes for the installation to complete. Once done, enable the following checkboxes from WHM >> Plugins >> Configure ClamAV Scanner and click Save.
Scan Entire Home Directory Scan Mail Scan Public FTP Space Scan Public Web Space
Each individual users will have a Virus Scanner option in his cPanel from where he can scan his files, emails etc.
The second method of ClamAV installation is through SSH. Login to the server and goto module-install directory and run the installer
# cd /usr/local/cpanel/modules-install/clamavconnector-Linux-i686/# ./install
That’s it. If you now plan to scan the server side files OR the website files of any account, the following commands are very much useful and provide you with a quick result.
Updating the antivirus database first:
To scan a directory and print a list of the infected files:
# clamscan -ri /home
Scan and directly remove the infected files and emails
# clamscan -ri –remove /home