[CentOS] permission problems with avamis and Centos 6.3

Thu Jan 24 03:16:32 UTC 2013
Robert Moskowitz <rgm at htt-consult.com>

I am trying to follow:


Which seems to really be written for Centos 5, with just some selinux 
references for Centos 6.  There are real problems here for Centos 6 with 
the userids section.

It gives the following command and result:

cat /etc/passwd | grep "amavis\|clamav"
clamav:x:101:102:Clam Anti Virus Checker:/var/clamav:/sbin/nologin
amavis:x:102:103:Amavis email scan user:/var/amavis:/bin/sh

But my Centos 6.3 has:

clam:x:494:490:Clam Anti Virus Checker:/var/lib/clamav:/sbin/nologin

Note the difference in userid clam instead of clamav.  So this causes 
problems with the group recommendation:

In addition, the clamav user should automatically have been added to the 
amavis group:

# groups clamav
clamav : clamav amavis

If not, you can manually add clamav to the amavis group:

gpasswd -a clamav amavis

so I did:

gpasswd -a clam amavis

So far, it seems just changing what userid is now used by clamav...

But in testing for spam I see the following in /var/log/maillog

Jan 23 15:56:17 test1 amavis[25669]: (25669-01) (!)run_av (ClamAV-clamd) 
FAILED - unexpected , 
lstat() failed: Permission denied. ERROR\n"

I checked this directory tree and all along the tree the permissions are 
to amavis:amavis

So where is my permission problem?