Manually run ClamAV on cPanel and check every user

August 29, 2013 — Leave a comment

If you’re running WHM/cpanel and want to run a scan on every user manually, perhaps when first installing ClamAV, you’ll want to run this command which is endorsed by cPanel themselves.

To enable ClamAV, you’ll want to enter WHM –> Configure ClamAV Scanner and select the check boxes for the type of scan you want to do.

Once that’s done, you can run it with this command:

Once its running, you can tail the /root/infections log file to see what it finds. You’ll start to see scan results as it finishes each user’s home directory.

You can then set up a root cron job to have it run during off hours. The example below will fire it off at 2am every night.

(ssh into the server and become root)

NOTE: this will just tell you about the infections it finds. You have two options if you’d like to deal with them during the scan:

Remove them (careful, this will delete the file forever.. if it’s a false positive, then you’re SOL).

Move them to a different folder:

No Comments

Be the first to start the conversation.

Leave a Reply