Hi,
I'm running DirectAdmin 1.715 (AlmaLinux / CloudLinux, Apache + ModSecurity with OWASP CRS) on three shared-hosting servers, with auto-update enabled in the panel.
I set the global ModSecurity engine to DetectionOnly in `/usr/local/directadmin/data/admin/modsecurity_rules`, and I also created per-domain DetectionOnly files for all domains. The per-domain files survive updates fine. But the global file does not: after every DirectAdmin update / CustomBuild install, it is rewritten to `SecRuleEngine Off`.
I have observed this three times now:
- Server 1: 24 Nov ~21:17 (during the 1.714 → 1.715 update)
- Server 2: 25 Nov 02:34 (same 1.714 → 1.715 update)
- Server 2 again: 26 Nov 06:24:59 (a reinstall of the same 1.715 build)
In each case the evidence lines up exactly: the custombuild.log entry `called: install` matches the global file's mtime to the second, the directadmin binary was replaced in the same minute, and DirectAdmin restarted right after. No one triggered these manually — the panel's auto-update did it.
My questions:
1. Is this intended behavior, or a bug? It seems wrong for an update to silently discard the administrator's setting.
2. Why is the global file rewritten from the default instead of preserving its current value?
3. Is there a supported way to make the global engine setting persistent across updates, other than setting it per-domain?
The practical concern: if an admin sets the global engine to DetectionOnly (or On) and doesn't re-check after every update, the global engine silently stays Off indefinitely — and any vhost relying on the global setting loses all ModSecurity protection/logging without any warning.
For now I have worked around it with per-domain DetectionOnly files on every domain, so my logging continues. But I'd like to understand whether the global reset is by design, and what the supported way to keep a global setting across updates is.
Thanks!
I'm running DirectAdmin 1.715 (AlmaLinux / CloudLinux, Apache + ModSecurity with OWASP CRS) on three shared-hosting servers, with auto-update enabled in the panel.
I set the global ModSecurity engine to DetectionOnly in `/usr/local/directadmin/data/admin/modsecurity_rules`, and I also created per-domain DetectionOnly files for all domains. The per-domain files survive updates fine. But the global file does not: after every DirectAdmin update / CustomBuild install, it is rewritten to `SecRuleEngine Off`.
I have observed this three times now:
- Server 1: 24 Nov ~21:17 (during the 1.714 → 1.715 update)
- Server 2: 25 Nov 02:34 (same 1.714 → 1.715 update)
- Server 2 again: 26 Nov 06:24:59 (a reinstall of the same 1.715 build)
In each case the evidence lines up exactly: the custombuild.log entry `called: install` matches the global file's mtime to the second, the directadmin binary was replaced in the same minute, and DirectAdmin restarted right after. No one triggered these manually — the panel's auto-update did it.
My questions:
1. Is this intended behavior, or a bug? It seems wrong for an update to silently discard the administrator's setting.
2. Why is the global file rewritten from the default instead of preserving its current value?
3. Is there a supported way to make the global engine setting persistent across updates, other than setting it per-domain?
The practical concern: if an admin sets the global engine to DetectionOnly (or On) and doesn't re-check after every update, the global engine silently stays Off indefinitely — and any vhost relying on the global setting loses all ModSecurity protection/logging without any warning.
For now I have worked around it with per-domain DetectionOnly files on every domain, so my logging continues. But I'd like to understand whether the global reset is by design, and what the supported way to keep a global setting across updates is.
Thanks!