[Mimedefang] clamav vs clamd vs clamscan

G.W. Haywood mimedefang at jubileegroup.co.uk
Mon Oct 13 12:23:02 EDT 2014


Hi there,

On Mon, 13 Oct 2014, Cliff Hayes wrote:

> Now I get this error when starting clamd:
> ERROR: Can't open/parse the config file /usr/local/etc/clamd.conf
> I am starting as root as instructed in clamd.conf
> I have gotten that error before ... it usually means there is a user issue.

That sounds like mystic nonsense.  What's "a user issue" supposed to mean?

> When I go back to running as root it knows to look in /etc/ for clamd.conf

This just means that you are starting the process in two different ways,
possibly from two different scripts, or you might even have two different
binaries installed.

Note that the search paths in the shell environment which are used by
a root shell and by a non-root shell will be different.  A root shell
will usually have /sbin/ and /usr/sbin/ in the path, but a non-root
shell won't.  When you run an executable, always type the full path so
that you know which one you're running or you'll confuse yourself.

Before the binaries are compiled the sources must be configured.  Part
of that configuration tells them to look for their configurations by
default in certain places.  These can be whatever locations you choose.
So for example if you have /sbin/clamd compiled to look in /etc/ and
/usr/local/sbin/clamd compiled to look in /usr/local/etc/ by default
then you will see something like what you're describing if you start
one and then the other *without* explicitly stating in the command
which starts the process where it is to look for its configuration.

If you look at the manpage for clamd by typing

man clamd

at a shell prompt it will explain this.

The clamd executable can be instructed to look for its configuration
file by means of a command-line option.  So you could for example say

/usr/local/sbin/clamd -c /home/configfile

or

/sbin/clamd -c /usr/local/etc/clamdconfigurationfile.2014.10.13

or whatever takes your fancy.

If you're really desperate you could for example just make a symlink
in /usr/local/ which points to /etc/clamd.conf but you'd be far better
off finding out what's really going on.

--

73,
Ged.



More information about the MIMEDefang mailing list