Re: freshclam & clamav questions



On Thu, 25 Oct 2007 13:39:13 +0200, goarilla wrote:

oOg wrote:
Hi, I have had various errors with these processes. Running Feisty 7.04.

Googled for answers and was pointed to

$ ls -l /usr/local/share/clamav
ls: /usr/local/share/clamav: No such file or directory

Can't lock database directory: /var/lib/clamav

is the message I get

[...]

I have no clue. Please someone kindly tip me off. I don't want no
viruses or identity theft, etc, and think this must work. Please and
thank you, if you will be so kind to help.

It was all automagically installed with synaptic.


====================
Well, DOH..., I guess that maybe I had a scan running when I got that
message, which would explain it. ;/ It (freshclam) runs OK now, only
updating sigs and telling me my engine is out of date. I did learn from
what you wrote, and appreciate it.

For your interest below I had written to try to answer the questions you
asked. [[oOg with red face humbly thanks the kind helpers and quietly goes
back to work arranging for brain transplant surgery and elective attention
augmentation.]]
====================





first of all unless your system is also a mail server
or something else that provides file sharing services to other clients (win)
running clamav is pretty worthless.

I'm not running the daemon, just do periodic scans with clamscan.

try this one: ls -ld /var/lib/clamav
that command gives you the actual permissions of that dir, ls -l dir/
just gives permissions of the
contents of the dir.

~$ ls -ld /var/lib/clamav
drwxr-xr-x 4 clamav clamav 1024 2007-10-25 17:01 /var/lib/clamav

Tells me I believe that only root has write permission.

The output of clamscan tells me to update, Synaptic doesn't show any
available updates, so I try freshclam as root, which gives me the error
shown above.

you're right to look for the perms tho since Can't lock database
directory: /var/lib/clamav does seem like a permission error.

how do you start clamav btw ?
and under which user account.
you can find commands with which and whereis

I only run clamscan. I run it as a normal user when I scan my home
directory,

$ clamscan -ir -l scan.txt

and as root when I scan the entire disk. Sorry I wasn't clear about that.

lastly read the documentation,

Yes I do a lot of this. I'm coming against some deadlines and thought
this might be too critical to postpone further. So I really appreciate
you taking your time and knowledge to try to help.

heck even try to find a ubuntu specific
howto for all i care

It's worth a thought.

and you can always strace the command and grep it for open and exec
system calls
example:

strace clamav &> strace.dump
egrep '^open|exec' strace.dump

Thanks. This is new to me and I will read about it and try it.

suid/seuid syscalls can also be valuable in this case, since well no
point in changing perms of a lot of files and thus opening up your
system if it's just running under the wrong (eg underpriveledged)
account

This is probably what it is about. Also possible, I don't think I did,
put perhaps I had another process using the directory or db. It's pretty
difficult and time consuming for me to figure each thing like this out
the very first time. I will use what you wrote. Thanks again.

PS: please don't post the same ls output twice

Sorry. It must have been an inadvertent extra middle mouse click paste.
I'll try to be more careful.
.



Relevant Pages

  • [opensuse] Who said Linux doesnot get Virus infections
    ... As you know clamAV provides NO realtime virus detection ... and from time to time we all need to execute a clamscan ... an infected file or execute an infected .bin file ...
    (SuSE)
  • Re: Netsky Problem on FreeBSD [really]
    ... >> We have some Samba shares on a FreeBSD server, ... The windows machines have ... > Install clamav or clamav-devel and then use clamscan to scan all of the ... Does Clamav or Clamav-devel work on base64 files ?. ...
    (comp.unix.bsd.freebsd.misc)
  • Re: Thoughts about finding viruses in email inboxes
    ... What clamav command are you running, exactly, and what version (of ... clamscan -i -r avtest ...
    (Ubuntu)
  • Re: postfix + clamav = problems
    ... amavisd-new) toward clamav. ... the daemon itself never responds to anything. ... Since clamav 0.90.x there are extensive performance problems with clamscan. ...
    (comp.unix.bsd.freebsd.misc)