Install and configure ClamAV plugin for cPanel

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:

  1. Log into WHM.
  2. In the top-left Find box, type in plugins, then click on Manage Plugins.
  3. Check the Install and keep updated selection box, then click Save at the bottom.
  4. The install process will take 10 minutes, so be patient and don’t close the web-browser until it completes.
  5. Log out, and then back into WHM again.
  6. In the top-left Find box, type in clamav, then click on Configure ClamAV Scanner.
  7. 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 DirectoryScan MailScan Public FTP Space, and Scan Public Web Space, then click on Save.

HOW TO Run ClamAV virus scan from cPanel

  1. Now login to your cPanel to use the virus scanner.
  2. Under the Advanced section, click on Virus Scanner.
  3. To start a new scan, select the type of scan you want, For example select Scan Entire Home Directory, then click on Scan Now.
  4. 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.
  5. 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.
  6. 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.
  7. Next you will see the cleanup process complete page.
  8. 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.