clamav

Clamscan is a command line antivirus scanner that allows scanning files and directories for potential viruses.

1) Clamscan version

[root@office ~]# clamd –V

ClamAV 0.97.6/15779/Wed Jul 24 22:37:48 2013

2) Run Clamscan

[root@root ~]# clamscan /home/arun/ >> /home/arun/Desktop/infected.txt
[root@root ~]#clamscan -r /var/www/vhosts/abc.com –infected > infected.txt

This will display the scan result in file infected.txt

[root@root ~]# clamscan -r -i mail –remove=yes —> Scan the folder named “mail” and remove the infected files.
[root@root ~]# clamscan -r -i /home/cP-UN/mail –move=/home/cP-UN/infected/ —-> It Scan folder named “mail” and moved all the infected files to /home/cP-UN/infected/ ]

3) Clamav does not work with cPanel >> virus scan

When you try to install Clamav from within WHM >> Plugin and access it through cPanel >> Virus Scan; and get the following error.

Scanning:….. connecting to clamd service

Solution: WHM >> Tweak Settings >> change the value of “Max cPanel process memory” to Unlimited and then reinstall ClamAV

4) Clamscan freshclam error

[root@root ~]# freshclamERROR: Please edit the example config file /usr/local/etc/freshclam.conf

ERROR: Can’t open/parse the config file /usr/local/etc/freshclam.conf

Solution:

Just comment out or delete the line in the two .conf files that says: # Comment it out #Example

5) Clam Scan installation on cPanel server

WHM >> Main >> cPanel >> Manage Plugins

Install it manually

[root@office1 ~]# cd /usr/local/srcrm -Rf clamav-*
[root@office1 ~]# wget http://downloads.sourceforge.net/clamav/clamav-0.96.tar.gz
[root@office ~]# tar -xzf clamav-*[root@office ~]# cd clamav-*

[root@office ~]# if [ -d “/usr/lib64″ ]; then libdir=”–libdir=/usr/lib64” ; fi ; ./configure –prefix=/usr $libdir –sysconfdir=/etc –disable-ipv6 –disable-zlib-vcheck

[root@office ~]# make
[root@office ~]# make install
[root@office ~]# freshclam
[root@office ~]# echo “ClamAV update complete!”

Popular Posts You May Read

Explore more hosting insights, tips and industry updates.

Dedicated SSL and Shared SSL for Whoiscart

What do we require to use Whoiscart Shared SSL or Dedicated SSL? We can use…

How to Create a Domain Alias in cPanel

A domain alias, in cPanel, is a powerful tool that allows you to point multiple domain…

How to Clear SSL State in Your Browser?

SSL (Secure Sockets Layer) is a security protocol that enables encrypted communication between a client…