WHM/cPanel “clamscan: command not found” after installation ClamAV Scanner

You can install ClamAV Scanner for cPanel with this manual http://docs.cpanel.net/twiki/bin/view/AllDocumentation/WHMDocs/ClamAv

But sometimes it does not work with command line and you get error “clamscan: command not found”

How to fix it?

ClamAV installations do not create symlinks in /usr/local/bin

Check that clamav is already installed:

# rpm -qa | grep clam
cpanel-clamav-0.98.4-1.cp1140.x86_64
cpanel-clamav-virusdefs-0.98.4-1.cp1140.x86_64

You can check original files:

# 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*

Create new symlinks:

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

Fixed!

Comments are closed.

Language
Страницы
Рекомендую