Symptoms
- While trying to switch on the jail for SSH at Plesk > Tools & Settings > IP Address Banning (Fail2Ban) > Jails the following error occurs:
PLESK_ERROR: Unable to switch on the selected jails: f2bmng failed: ERROR No file(s) found for glob /var/log/secure
ERROR Failed during configuration: Have not found any log file for ssh jail
ERROR:f2bmng:Command ‘[‘/usr/bin/fail2ban-client’, ‘reload’, ‘ssh’]’ returned non-zero exit status 255
ERROR:f2bmng:Failed to reload following jails due to errors in configuration: ssh.
Cause
Missing /var/log/secure
file:
# ls -la /var/log/secure
ls: cannot access /var/log/secure: No such file or directory
Resolution
- Connect to the server via SSH;
- CreateÂ
/var/log/secure
file using the following command:# touch /var/log/secure
- Grant appropriate permissions to it with the following commands:
# chown root:root /var/log/secure
#Â chmod 600Â /var/log/secure