ClamAV installed, but not working on the command line and appears to not be installed


On 11.40+ You may try to install ClamAV and then see if t have problems when trying to run on your serverits, its easier to fix than you think.

root@host [~]# clamscan -ri /home/*/public_html/

-bash: clamscan: command not found

 In cPanel the ClamAV executables are installed in /usr/local/cpanel/3rdparty/bin/. Historically symlinks have been created in /usr/local/bin to help use on the command line. As of 11.40, new ClamAV installations do not create symlinks in /usr/local/bin. If the symlinks are present (from a previous or incomplete installation) the installation treats the opperation as an “upgrade”, and re-creates them to the path of the install.

If you are having this problem, and have already installed ClamAV through WHM, check to make sure that your executables are here:

# ls -lah /usr/local/cpanel/3rdparty/bin/*clam*

 If they are, make sure that there are no current ClamAV files in /usr/local/bin:

# ls -l /usr/local/bin/*clam*

 If both of those check out, you can create symlinks in /usr/local/bin to make scanning your server easier.

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


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


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

ln -s /usr/local/cpanel/3rdparty/bin/clamav-config


 Double check your work with this command:

# ls -l /usr/local/bin/*clam*

 Then you can scan your server’s public_html folders with this command:

# clamscan -ri /home/*/public_html/



Leave a Reply

Your email address will not be published. Required fields are marked *