Skip to content

Commit 61c1f98

Browse files
committed
[Change] docs: ignore_inotify ERE + literal: prefix across 3 surfaces; issue #484
[Change] files/ignore_inotify: header rewrite — ERE default, literal: opt-in, mixed examples (regex + literal + plain) [Change] README.md §7 Monitor Mode: Ignore files paragraph corrected [Change] files/maldet.1 FILES section: ignore_inotify description aligned [Change] CHANGELOG, CHANGELOG.RELEASE: v2.0.1 [Change] entry
1 parent 02aef9a commit 61c1f98

5 files changed

Lines changed: 29 additions & 12 deletions

File tree

CHANGELOG

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ v2.0.1 | Mar 25 2026:
9494
[Change] tests/48-monitor-ignore-regex.bats: integration coverage for
9595
ignore_inotify ERE + literal: prefix + ignore_paths monitor-mode
9696
consistency + malformed-regex symmetry; issue #484
97+
[Change] docs: ignore_inotify ERE-default + literal: prefix semantics
98+
across ignore_inotify header, README §7, maldet.1 FILES; issue #484
9799
[Change] tests: prune two tautological assertions — the
98100
"uninstall.sh delegates service removal to pkg_service_uninstall"
99101
grep-for-token check in 01-install-cli.bats (string presence, not

CHANGELOG.RELEASE

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ v2.0.1 | Mar 25 2026:
9494
[Change] tests/48-monitor-ignore-regex.bats: integration coverage for
9595
ignore_inotify ERE + literal: prefix + ignore_paths monitor-mode
9696
consistency + malformed-regex symmetry; issue #484
97+
[Change] docs: ignore_inotify ERE-default + literal: prefix semantics
98+
across ignore_inotify header, README §7, maldet.1 FILES; issue #484
9799
[Change] tests: prune two tautological assertions — the
98100
"uninstall.sh delegates service removal to pkg_service_uninstall"
99101
grep-for-token check in 01-install-cli.bats (string presence, not

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,7 @@ maldet -k
669669

670670
When using the `users` mode, only subdirectories matching `inotify_docroot` (default: `public_html,public_ftp`) are monitored, plus the system temp directories `/tmp`, `/var/tmp`, and `/dev/shm`.
671671

672-
**Ignore files (inotify):** Monitor exclusions union two files — the user-owned `/usr/local/maldetect/ignore_inotify` and the LMD-managed `/usr/local/maldetect/internals/ignore_inotify.defaults`. Both are line-separated, substring-matched against the full event path, and support `#` comments + blank lines. ERE metacharacters are auto-escaped — do not use anchors (`^`, `$`) or wildcards (`*`, `+`, `.`). The defaults file is overwritten on every LMD upgrade; add site-specific exclusions to `ignore_inotify` only.
672+
**Ignore files (inotify):** Monitor exclusions union two files — the user-owned `/usr/local/maldetect/ignore_inotify` and the LMD-managed `/usr/local/maldetect/internals/ignore_inotify.defaults`. Both are line-separated and support `#` comments + blank lines. The user-owned `ignore_inotify` accepts POSIX ERE (extended regex) by default — anchors (`^`, `$`) and wildcards (`.*`, `.+`) work. To exclude a literal path containing regex metacharacters, prefix the entry with `literal:` (e.g. `literal:/tmp/app.cache`). The LMD-managed `ignore_inotify.defaults` is treated as literal substrings — its curated entries are auto-escaped at load time. The defaults file is overwritten on every LMD upgrade; add site-specific exclusions to `ignore_inotify` only.
673673

674674
---
675675

files/ignore_inotify

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,16 @@
33
# Site-specific inotify exclusions. Consulted IN ADDITION TO
44
# $inspath/internals/ignore_inotify.defaults (LMD-managed).
55
#
6-
# Format: one substring per line. ERE metacharacters are auto-escaped
7-
# at load time — do NOT use anchors (^ $) or wildcards (* + .).
6+
# Format: one entry per line. Entries are POSIX ERE (extended regex)
7+
# by default — anchors (^ $) and wildcards (.* .+) work as expected.
8+
# To exclude a literal path containing regex metacharacters, prefix
9+
# the entry with "literal:" (lowercase, 8 chars).
10+
#
811
# Lines beginning with # are comments. Blank lines are ignored.
912
#
1013
# Examples:
11-
# /home/user/public_html/cache/
12-
# backup-
13-
# .tmp
14+
# ^/tmp/.*scantem.* # regex: ClamAV scan-temp noise
15+
# ^/var/www/vhosts/.*/logs/.*$ # regex: Plesk per-vhost logs
16+
# literal:/home/user/public_html/._app.cache # literal path with dots
17+
# /home/user/public_html/cache/ # plain path (no metachars — still ERE-safe)
1418

files/maldet.1

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -872,14 +872,23 @@ Monitor exclusions union two files:
872872
(LMD\-managed under
873873
.IR $inspath/internals/ ,
874874
refreshed on every upgrade).
875-
Entries in both files are line\-separated, substring\-matched against the full event path, and support
875+
Entries in both files are line\-separated and support
876876
.B #
877877
comments plus blank lines.
878-
ERE metacharacters
879-
.RI ( . ,
880-
.IR * ,
881-
.IR + ,
882-
etc.) are automatically escaped \(em do not use anchors or wildcards.
878+
The user\-owned
879+
.B ignore_inotify
880+
accepts POSIX ERE (extended regular expressions) by default \(em anchors
881+
.RB ( ^ ,
882+
.BR $ )
883+
and wildcards
884+
.RB ( .* ,
885+
.BR .+ )
886+
work as expected.
887+
To exclude a literal path containing regex metacharacters, prefix the entry with
888+
.BR literal: .
889+
The LMD\-managed
890+
.B ignore_inotify.defaults
891+
is treated as literal substrings \(em its curated entries are auto\-escaped at load time.
883892
The defaults file ships curated exclusions for
884893
.BR systemd-private
885894
tmpdirs, MariaDB temp tables, PostgreSQL, Redis, ClamAV runtime, and common backup agents.

0 commit comments

Comments
 (0)