I installed avast4linux and avst4mail (and libavastengine) on a gentoo-machine with qmail an like to integrate it into qmail.
I followed the instructions in the INSTALL file but I get the following error when starting avastd:
May 04 15:07:51 avastd[25301]: info: Starting avast! daemon
May 04 15:07:51 avastd[25301]: info: using this configuration for section 'mail'
May 04 15:07:51 avastd[25301]: info: daemons count: default=3, maximum=10
May 04 15:07:51 avastd[25301]: info: avast! interface: /var/run/avastmail/mailscanner.sock (timeout: 300s)
May 04 15:07:51 avastd[25301]: info: user: avmail
May 04 15:07:51 avastd[25301]: info: group: avmail
May 04 15:07:51 avastd[25301]: info: rootdir: /var
May 04 15:07:51 avastd[25301]: info: datadir: /var/lib/avast4
May 04 15:07:51 avastd[25301]: info: tempdir: /var/tmp/avast4
May 04 15:07:51 avastd[25301]: info: licensefile: /var/lib/avast4/License.dat
May 04 15:07:51 avastd[25301]: info: scan subdirectories: no
May 04 15:07:51 avastd[25301]: info: avast! engine flags: testall
May 04 15:07:51 avastd[25301]: info: packers: types=A, maxdepth=32, summary archives=no
May 04 15:07:51 avastd[25301]: info: packers bombs: maxfilesize=500000, maxcompressratio=50, compresscheckthre
shold=10000
May 04 15:07:51 avastd[25301]: info: maxtotalcompressratio=100, totalcompresscheckthreshold=100
0
May 04 15:07:51 avastd[25301]: info: log scan results: loginfected logscanerrors
May 04 15:07:51 avastd[25301]: info: listenning on unix socket /var/run/avastmail/mailscanner.sock
May 04 15:07:51 avastd[25302]: warning: can't set group name to 'avmail', Operation not permitted
May 04 15:07:51 avastd[25302]: warning: can't change program root directory to '/var', Operation not permitted
May 04 15:07:51 avastd[25301]: info: started new 'mail' process (pid=25302)
May 04 15:07:51 avastd[25303]: warning: can't set group name to 'avmail', Operation not permitted
May 04 15:07:51 avastd[25303]: warning: can't change program root directory to '/var', Operation not permitted
May 04 15:07:51 avastd[25301]: info: started new 'mail' process (pid=25303)
May 04 15:07:51 avastd[25304]: warning: can't set group name to 'avmail', Operation not permitted
May 04 15:07:51 avastd[25304]: warning: can't change program root directory to '/var', Operation not permitted
May 04 15:07:51 avastd[25301]: info: started new 'mail' process (pid=25304)
But the avastd seems to run.
When sending a mail I get the following error:
May 04 15:09:47 avastd[23278]: info: new avast! socket connection at /var/run/avastmail/mailscanner.sock
May 04 15:09:47 avastd[23278]: warning: mail[23279]: /var/lib/avastmail/tmp/msg131675372 [E] Permission denied
May 04 15:09:47 avastd[23278]: info: closing avast! connection
In the header of the send mail I get the following:
Yes, I start it as root. Its the same result if I start it with /etc/init.d/avastd or directly with /usr/sbin/avastd
Here’s the ps output from a running process. As you see, the gid is not changed:
then, run avastd under strace -f , to get clue why are the system calls for setuid/setgid/chdir failing (why is the returned value -EPERM). doesn’;t make sense for me, when the software runs under root-account.
I have run avastd under strace -f but do not find a reason for my problem. The log is to big to attach it. Here is the link to it. Would be nice if you could have a look at it. http://dl.dropbox.com/u/712194/avastd-strace.txt
Seems like there’s bad ordering of id-changes, where uid-change preceedes groupid-change - i’ll forward it to my colleague who’s responsible for this piece of code, test build will be available tommorow.