3

I am new to Ubuntu had installed ClamTK antivirus using command:

sudo apt-get install clamav clamtk

and i am unable to scan anything. Whenever i try to scan it completes within 1 second and I get this:

Screenshot

which shows 0 files scanned,but i selected a directory and scanned it.Where is the problem?I had also tried updating Clamtk using command sudo freshclam but it shows this error

ERROR: /var/log/clamav/freshclam.log is locked by another process
ERROR: Problem with internal logger (UpdateLogFile = /var/log/clamav/freshclam.log).
Weirdoooo
  • 147

5 Answers5

3

The clamtk settings may not be selected correctly. By default, some settings may be disabled and you may have to activate them as below. Please check Configuration -> Settings menu for the items below and activate them by ticking/selecting;

  • tick -> scan files larger than 20 MB
  • tick -> scan directories recursively
0

The ClamAV configuration file is probably still the default bundled with the the installation. To fix this error you have to:

  1. Rename /usr/local/etc/freshclam.conf.sample to freshclam.conf and edit the line with the word Example to #Example. AND
  2. Rename /usr/local/etc/clamd.conf.sample to clamd.conf and edit the line with the word Example to #Example.

Root owns these files so I did this using sudo from a terminal window:

 cd /usr/local/etc
 sudo cp freshclam.conf.sample freshclam.conf
 sudo cp clamd.conf.sample clamd.conf
 sudo gedit

Edit both freshclam.conf and clamd.conf and change line 8: Example to #Example. Save the files.

You can get more elaborate by changing other lines in the files, but I don't want to go there.

theYnot
  • 733
  • 5
  • 14
Orion
  • 1
0

Renaming the freshclam.conf.sample and clamd.conf.sample files (removing the .sample), as well es editing them in a text editor and adding an # in front of line 8 (which is "Example"), and then to enable the in-terminal scan feature, run:

sudo freshclam

Next, run (where %directory% is the path you want to scan):

clamscan %directory%

As well as the clamtk app scanning feature.

I'm flabbergasted by how hard this solution was to find. It's such a common error.

sotirov
  • 4,379
-1

Also, remove spaces from file names. It clamtk probably thinks you want several files scanned and can't find them. For example text_file.txt will be scanned text file.txt will not be scanned because it thinks you want to scan a file named text and a file named file. Linux in general doesn't like spaces in file names. Any function in terminal on a file with spaces in terminal should have " " around file name i.e. clamscan "text file.txt"

-1

I only got the Clamtk GUI to work after I typed: clamscan -r --remove / in the terminal to use the terminal to scan for viruses. After doing that the GUI now works. Hope this helps.