Mailing List Archive

[clamav-users] --config-file= bug
Hello

As it seems clamdscan always load the default clamAV config file and ignore
--config-file= (if passed)

e.g. I tried

clamdscan --verbose --config-file=/usr/local/test/clamd_custom.conf /home/files/*

I tried to change various settings in clamd_custom.conf   e.g.
DetectPUA , PhishingSignatures , PhishingScanURLs and other
and these new settings are fully ignored.

This problem exists in current and old recent clamAV versions

Graziano
Re: [clamav-users] --config-file= bug [ In reply to ]
Hello,

Le 30/03/2022 à 14:36, Gabriel via clamav-users a écrit :
> Hello
>
> As it seems clamdscan always load the default clamAV config file and ignore
> --config-file= (if passed)
>
> e.g. I tried
>
> clamdscan --verbose --config-file=/usr/local/test/clamd_custom.conf
> /home/files/*
>
> I tried to change various settings in clamd_custom.conf   e.g.
> DetectPUA , PhishingSignatures , PhishingScanURLs and other
> and these new settings are fully ignored.
>
> This problem exists in current and old recent clamAV versions


If you have an alternate config file for clamd, then it means you must
have a second clamd daemon in memory.

So I hope your settings in clamd_custom.conf about TCPSocket is
different than 3310.


--
Cordialement / Best regards,

Arnaud Jacques
Gérant de SecuriteInfo.com

Téléphone : +33-(0)3.60.47.09.81
E-mail : aj@securiteinfo.com
Site web : https://www.securiteinfo.com
Facebook : https://www.facebook.com/pages/SecuriteInfocom/132872523492286
Twitter : @SecuriteInfoCom
Signatures for ClamAV antivirus : http://ow.ly/LqfdL

_______________________________________________

clamav-users mailing list
clamav-users@lists.clamav.net
https://lists.clamav.net/mailman/listinfo/clamav-users


Help us build a comprehensive ClamAV guide:
https://github.com/vrtadmin/clamav-faq

http://www.clamav.net/contact.html#ml
Re: [clamav-users] --config-file= bug [ In reply to ]
Hi there,

On Wed, 30 Mar 2022, Gabriel via clamav-users wrote:

> As it seems clamdscan always load the default clamAV config file and ignore
> --config-file= (if passed)
>
> e.g. I tried
>
> clamdscan --verbose --config-file=/usr/local/test/clamd_custom.conf
> /home/files/*
>
> I tried to change various settings in clamd_custom.conf   e.g.
> DetectPUA , PhishingSignatures , PhishingScanURLs and other
> and these new settings are fully ignored.

You have misunderstood the use of the --config-file option.

Quoting the clamdscan 'man' page:

8<----------------------------------------------------------------------
DESCRIPTION
clamdscan is a clamd client which may be used as a clamscan
replacement. It accepts all the options implemented in clamscan
but most of them will be ignored because its scanning abilities
only depend on clamd.
8<----------------------------------------------------------------------

The clamdscan utility uses a clamd daemon to perform the actual scan.

This means that the clamd daemon must be running before the clamdscan
command is issued. This means that the scanning settings are already
defined for clamd when clamdscan starts; clamdscan cannot change them.

The clamdscan utility needs to know how to connect to the clamd daemon
and it uses the configuration file to find out. As you obviously know
the configuration file which you are using might not be the default so
the --config-file option lets you tell clamdscan where to look for it.

Do not expect clamdscan to respond to changes in the scanning settings
in clamd.conf nor any other clamd configuration file. For the changes
to take effect, clamd needs to re-read the configuration file itself.

--

73,
Ged.

_______________________________________________

clamav-users mailing list
clamav-users@lists.clamav.net
https://lists.clamav.net/mailman/listinfo/clamav-users


Help us build a comprehensive ClamAV guide:
https://github.com/vrtadmin/clamav-faq

http://www.clamav.net/contact.html#ml