[CentOS] clamd at amavisd fails under systemd

Fri Nov 11 00:36:31 UTC 2016
Gordon Messmer <gordon.messmer at gmail.com>

On 11/09/2016 02:07 AM, Rob Kampen wrote:
> so I have /etc/tmpfiles.d/clamd.amavisd.conf with content
> d /var/run/clamd.amavisd 0755 amavis amavis -
>
> the process owner name and group name are amavis
> this is not quite what you specified - which should it be?

If "User" is set to amavis in the clamd configuration, that looks fine.

> My real head scratch problem is that running clamd from a cli works 
> perfectly.
> Trying to get systemd (via systemctl start clamd at amavisd.service) 
> brings it up but after 1 second removes the pid file and shuts down. 
> set up clamd via the service file to use --debug and get nothing helpful
> Trying to debug this systemd stuff seems impossible 

systemd starts processes in the correct SELinux context, while running 
it from the shell does not.  So my first guess would be that it's an 
SELinux issue.  Use "setenforce" to put the system in permissive mode to 
see if that's the case.  If so, "grep AVC /var/log/audit/audit.log" for 
more info.