Chris wrote:
> When running clamdscan against a file in my home directory I get:
> 
> [EMAIL PROTECTED] ~]$ clamdscan testmsg.txt
> /home/chris/testmsg.txt: Access denied. ERROR
> 
>

The clamd daemon does no have permission to read the file. You can get
around this by redirecting the file via clamdscan:

[EMAIL PROTECTED] ~]$ clamdscan - <testmsg.txt

The "-" is important. This will stream the file to clamd rather than
telling clamd where the file is located. As a result it does not matter
what the permissions are because clamd does not see the file. However,
you must have permission to read the file into clamdscan. For files in
your home directory this is normally true.

A problem with this is that it does not allow you to stream batches of
files. For that you can try using a for loop:

To scan all files with .txt as an extension in the current directory:

[EMAIL PROTECTED] ~]$ for file in *.txt;do
   echo $file && clamdscan - < $file
done

dp

_______________________________________________
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://lurker.clamav.net/list/clamav-users.html

Reply via email to