Dedicated Website Hosting or cPanel Server customers who maintain an administrator role may encounter frequent emails from the server with the following subject:
lfd on <server>: Suspicious File Alert
These alerts are generated by ConfigServer Security & Firewall (CSF)'s Login Failure Daemon (lfd), which watches for suspicious script files created in temporary directories like /tmp or /dev/shm.
Reference: cPanel Support Article on Suspicious File Alerts
Use root credentials to access WebHost Manager (WHM).
In WHM, go to:
WHM > Plugins > ConfigServer Security & Firewall
Or search for "ConfigServer" or "CSF" in the sidebar.
Click on "Firewall Configuration" under the CSF interface.
Search for the following setting:
LF_DIRWATCH
By default, this may be set to a number representing the scan interval in seconds (e.g., 3600).
To disable these alerts entirely, set:
LF_DIRWATCH = 0
This disables lfd from scanning /tmp, /dev/shm, and similar directories for suspicious file types.
Scroll to the bottom and click "Change" to save the configuration.
After saving, click "Restart csf+lfd" to apply the new configuration.
If you wish to reduce false positives without disabling directory watching completely, you may:
Adjust:
LF_DIRWATCH_FILE_TYPES = "perl|py|cgi|pl|sh|rb"
This removes .php from the scan, which is the common cause of false alerts from services like PHP-FPM.
Edit the CSF ignore file:
/etc/csf/csf.fignore
Add:
/tmp/systemd-private-*
Save the file and restart CSF/LFD.
Disabling this feature stops lfd from alerting you about any script-like files dropped in temp space — which may include malware. Ensure you have other malware scanning tools (e.g., ImunifyAV, ClamAV) running if you disable this.
| Setting | Value to Disable | Purpose |
|---|---|---|
LF_DIRWATCH |
0 |
Disables suspicious file alerts |
By following the steps above, you can eliminate noisy and often unnecessary alerts for PHP-FPM-related temp files while maintaining full control over your server security posture.