Friday, 8 October 2010

Slackware ClamAV Antivirus Setup and use in Thunar

 a) Create clamav group and user in system as :

groupadd clamav
useradd -g clamav -s /bin/false -c "Clam AntiVirus" clamav

b) Download the Source code in tar.gz format
(look for latest stable release)
c)  extract the tar and install the ClamAV.

tar -xzvf clamav-0.96.3.tar.gz
cd clamav-0.96.3
./configure --sysconfdir=/etc
make install

d) Test It on console as:
clamscan filename

if you get any error for .so , try rebooting the system.

e) to update the antivirus DataBase.

I use this command in my root cron which run every hour.

OR/AND to run this command as daemon
freshclam -d

use whichever suits you.

f) I like AV option in right click menu in my XFCE. so I use custom command which i create as :

login to console and :
mkdir -p $HOME/clamav/quarantine

go to Thunar -> Edit->Configure Custom Actions-> [+] add new.
Name = ClamAv Scan
Description = ClamAV Scanner
command = clamscan --bell --log=$HOME/clamav/logfile --recursive=yes --move=$HOME/clamav/quarantine/ --detect-pua=yes --detect-structured=yes  --scan-mail=yes --phishing-sigs=yes  --phishing-scan-urls=yes --phishing-ssl=yes --phishing-cloak=yes  --algorithmic-detection=yes --scan-pe=yes --scan-elf=yes --scan-ole2=yes  --scan-pdf=yes  --scan-html=yes  --scan-archive=yes  --detect-broken=yes %F

Add any favorite icon or clam-av icon from system and that's it.

I hope this helps.

No comments:

Post a Comment