In this article we’ll show how to install and configure the ClamAV plugin for cPanel. ClamAV is a popular open source anti-virus scanner, and with the ClamAV plugin you can allow your cPanel users to scan their e-mails as well as scan their home directories for malicious files.
Previously we have talk about how to install ClamAV on CentOS.
To Setup ClamAV on WHM, follow the steps below:
- Log into WHM.
- In the top-left Find box, type in plugins, then click on Manage Plugins.
- Check the Install and keep updated selection box, then click Save at the bottom.
- The install process will take 10 minutes, so be patient and don’t close the web-browser until it completes.
- Log out, and then back into WHM again.
- In the top-left Find box, type in clamav, then click on Configure ClamAV Scanner.
- Here you can set the global scan permissions as you like. If you’d simply want to allow any cPanel user to scan any of their stuff you can place a check beside Scan Entire Home Directory, Scan Mail, Scan Public FTP Space, and Scan Public Web Space, then click on Save.
HOW TO Run ClamAV virus scan from cPanel
- Now login to your cPanel to use the virus scanner.
- Under the Advanced section, click on Virus Scanner.
- To start a new scan, select the type of scan you want, For example select Scan Entire Home Directory, then click on Scan Now.
- After the scan is complete there will be a list of infected files in the Infected Files: section, click OK on the confirmation window that pops-up to continue.
- After the scan is complete there will be a list of infected files in the Infected Files: section, click OK on the confirmation window that pops-up to continue.
- You can simply use Quarantine column to place these files outside of our /public_html directory so they are not still accessible. We could also just outright Destroy them, or Ignore them by changing our selection to those columns. Then simply click on Process Cleanup.
- Next you will see the cleanup process complete page.
- Now if you use cPanel’s File Manager you can see the newly created quarantine_clamavconnector directory in your home directory to check the quarantined files.