HOW TO RUN A CLAM AV MALWARE/VIRUS SCAN ON YOUR DEDICATED SERVER

Running a malware/virus scan on your dedicated server is not hard nor complicated at all - though to scan efficiently on a dedicated server the process must be done logged in as root with an ssh connection.

Make sure in WHM clamav is up to date as can be ( WHM/cPanel always seem to lag behind a bit ) by checking in WHM --> Manage Plugins --> and that "Install and keep updated" is check marked.

To invoke the clam scan help menu:

/usr/local/cpanel/3rdparty/bin/clamscan --help


To scan everything in the home directory in one shot and have the found infections moved to a folder i.e. /root/infected/ ( the "infected" folder must be created prior to running the command )

/usr/local/cpanel/3rdparty/bin/clamscan -ir /home/ --exclude-dir='/home/virtfs|/home/.cpan|/home/.cpcpan' -l /var/log/clamscan.log --move=/root/infected


To scan everything in just the /public_html/ folders in one shot and have the found infections moved to a folder i.e. /root/infected/ ( the "infected" folder must be created prior to running the command )

/usr/local/cpanel/3rdparty/bin/clamscan -ir /home/*/public_html --exclude-dir='/home/virtfs|/home/.cpan|/home/.cpcpan' -l /var/log/clamscan.log --move=/root/infected


If you use scripts that expect ClamAV binaries in the /usr/local/bin directory, create symbolic links with the following commands:

ln -s /usr/local/cpanel/3rdparty/bin/clamscan /usr/local/bin/clamscan

ln -s /usr/local/cpanel/3rdparty/bin/freshclam /usr/local/bin/freshclam
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

WHAT WE MANAGE AND FIREWALL FALSE POSITIVES

Relevant to dedicated servers and answering an inquiry from a dedicated server client:Certainly...

ADDING MEMCACHED TO CENTOS 6.5+ AND CENTOS 7+

Step 1: SSH into your server and fire this command yum install memcached.x86_64 Step 2: Next...

APACHE NOBODY ATTACK SCRIPT

The Apache Nobody attack script is useful in stopping those that are victims of Apache Nobody...

BOOT PARTITION FILLING UP

The boot partition can fill up with excess kernels causing the system to crash if the boot...

CLOUDFLARE RAILGUN SERVER INSTALLATION

Installing CloudFlares RailgunThe following tutorial considers that one is already a CloudFlare...

Powered by WHMCompleteSolution