clamdscan says Access denied. ERROR on all files
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
clamav (Ubuntu) |
Fix Released
|
Undecided
|
Jamie Strandboge |
Bug Description
Binary package hint: clamav
Hello, I don't know what's the problem really is, let's see a session:
imi@most:~$ cd Asztal/
imi@most:~/Asztal$ clamdscan words.txt
/home/imi/
----------- SCAN SUMMARY -----------
Infected files: 0
Time: 0.008 sec (0 m 0 s)
imi@most:~/Asztal$ ls -ladh words.txt .
drwxr-xr-x 16 imi imi 4,0K 2009-10-13 12:19 .
-rw-r--r-- 1 imi imi 2,5M 2009-09-21 15:40 words.txt
imi@most:~/Asztal$ cp words.txt ..
imi@most:~/Asztal$ cd ..
imi@most:~$ clamdscan words.txt
/home/imi/
----------- SCAN SUMMARY -----------
Infected files: 0
Time: 0.008 sec (0 m 0 s)
imi@most:~$ ls -ladh words.txt .
drwxr-xr-x 65 imi imi 4,0K 2009-10-13 12:42 .
-rw-r--r-- 1 imi imi 2,5M 2009-10-13 12:42 words.txt
imi@most:~$ rm words.txt
imi@most:~$ cd /tmp
imi@most:/tmp$ cp /home/imi/
imi@most:/tmp$ clamdscan words.txt
/tmp/words.txt: OK
----------- SCAN SUMMARY -----------
Infected files: 0
Time: 0.350 sec (0 m 0 s)
imi@most:/tmp$ ls -ladh words.txt .
drwxrwxrwt 19 root root 4,0K 2009-10-13 12:43 .
-rw-r--r-- 1 imi imi 2,5M 2009-10-13 12:43 words.txt
imi@most:/tmp$ LANG=en_US id
uid=1000(imi) gid=1000(imi) groups=
ProblemType: Bug
Architecture: i386
DistroRelease: Ubuntu 9.04
Package: clamav-daemon 0.95.2+
ProcEnviron:
PATH=(custom, user)
LANG=hu_HU.UTF-8
SHELL=/bin/bash
SourcePackage: clamav
Uname: Linux 2.6.28-15-generic i686
Hi
The problem could be that clamdscan uses clamav daemon to scan for files, but clamav daemon runs with user clamav, which doesn't have acces to your files in /home/imi (because /home/imi has 0700 permissions probably).
You could consider using clamscan instead of clamdscan for scanning files in /home.