Log file paths for CSF on Ubuntu

The log file paths in Ubuntu are slightly different to those of CentOS, and as such need to be adjusted in CSF. You might have noticed this if you’ve been getting an error similar to:

Error: Failed to detect code [some-random-code] in SYSLOG_LOG [/var/log/messages]

We installed DirectAdmin on Ubuntu, and found this to be the case. To solve this, edit csf.conf:

nano /etc/csf/csf.conf

Change

/var/log/messages

To

/var/log/syslog

Also, change

/var/log/secure

To

/var/log/auth

Then restart CSF and LFD with the following:

csf -r
systemctl restart lfd