InMotion Hosting Support Center

In this article we'll discuss how you can 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.

Getting this installed yourself would require root access on either your VPS (Virtual Private Server) or dedicated server, or you can contact support to have us install the ClamAV anti-virus plugin for you for a $25 installation fee. You can follow the steps below to get ClamAV setup if you already have root access.

Install and configure ClamAV plugin in WHM

  1. Log into WHM.
  2. In the top-left Find box, type in plugins, then click on Manage Plugins.
  3. Place a check beside ClamAV in the Install and keep updated selection box, then click Save at the bottom.
  4. The install process can take a good amount of time, upwards of 10 minutes, so be patient and don't close the web-browser until it completes. When it finishes you'll see a Process Complete message at the bottom of the screen.
  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. Now you can set the global scan permissions you'd like to set. If you'd simply like 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.


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. Now to start a new scan, select the type of scan you want, in this example we're doing 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. In this case all 3 of the files that were found are coming up for known variants of a PHP mailer or PHP shell, so we can just leave the selections in the Quarantine column to place these files outside of our /public_html directory so they are not still accessible to the outside world. We could also just outright Destroy them, or Ignore them by changing our selection to those columns. Then simply click on Process Cleanup.
  6. You should now see the cleanup process complete page.
  7. Now if you use cPanel's File Manager you can navigate to the newly created quarantine_clamavconnector directory in your home directory to see the quarantined files.


Run ClamAV scan from console (SSH)

  1. Login to your server via SSH.
  2. Run the following command to scan the entire /home/userna5/public_html directory:

    clamscan -ri /home/userna5/public_html

    The r flag is for recursive, and the i flag is to only show infected files.

    You should end up with a listing of any infected files that were found such as:

    /home/userna5/public_html/uploads/mail.php: PHP.Mailer-7 FOUND
    /home/userna5/public_html/uploads/sh.php: PHP.C99-13 FOUND
    /home/userna5/public_html/uploads/view.php: PHP.C99-13 FOUND

    ----------- SCAN SUMMARY -----------
    Known viruses: 1324142
    Engine version: 0.97.6
    Scanned directories: 4979
    Scanned files: 13835
    Infected files: 3
    Data scanned: 583.20 MB
    Data read: 1193.90 MB (ratio 0.49:1)
    Time: 372.032 sec (6 m 12 s)

  3. To see all of the options available to you for the clamscan command append the --help flag.

    clamscan --help

You should now understand how to install and configure the ClamAV plugin for cPanel to help protect your accounts against virus threats.

Was this article helpful?
Continued Education in Course Web Host Manager (WHM)
You are viewing Section 19: 303: Install and configure ClamAV plugin for cPanel
Section 20: 304: Install Munin plugin for WHM

Related Questions

Here are a few questions related to this article that our customers have asked:
Ooops! It looks like there are no questions about this page.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question

Support Center Login

Our Login page has moved, Click the button below to be taken to the login page.

n/a Points
2015-09-17 1:20 pm

Hi. I post a comment earlier but it seems like it wasn't saved. 

I'm a bit new to cPanel and WHM.  I want to install clamav so I can use it to scan for viruses with my php script. I have this version.

CENTOS 6.7 x86_64 virtuozzo – vps13703 WHM 11.50.0 (build 30)

My problem is I that I can't find the "Manage Plugins" link which I assume was removed. How can I install clamav in this version?



31,313 Points
2015-09-17 5:39 pm
Hello Jon,

Thank you for contacting us. Make sure you are logging into WHM as root.

If you don't have root access, you can submit a ticket request. They will inform you of any charges (if necessary) before proceeding.

Thank you,

Post a Comment

Email Address:
Phone Number:

Please note: Your name and comment will be displayed, but we will not show your email address.

4 Questions & Comments

Post a comment

Back to first comment | top

Need more Help?


Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail:
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!