[clamav-users] How to exclude /tmp/systemd-* but include /tmp/ ?

G.W. Haywood clamav at jubileegroup.co.uk
Fri Sep 24 18:44:26 UTC 2021


Hi there,
41;366;0c
On Fri, 24 Sep 2021, dee heffemm via clamav-users wrote:

> I've tried "ExcludePath /tmp/systemd-*" but the obvious regex ...

It's not obvious to me that your regex does what you think it does.
You've probably been using things like that in a shell (or Windows?)
but regexes behave differently.  In a regex, an asterisk means "zero
or more occurreneces of the preceding element".

The preceding element in your regex is the character '-', which means
that your regex excludes

/tmp/systemd
/tmp/systemd-
/tmp/systemd--
/tmp/systemd---
/tmp/systemd----
/tmp/systemd-----

ad infinitum...

Instead, try something like

ExcludePath /tmp/systemd.*

You can use the ExcludePath directive more than once (more or less as
many times as you like) in the configuration file.

HTH

-- 

73,
Ged.


More information about the clamav-users mailing list