How can I fix the error: error: failed to rename /usr/local/maldetect/logs/inotify_log?

After upgrading maldet you get a cron error email like:

/etc/cron.daily/logrotate:
 
error: failed to rename /usr/local/maldetect/logs/inotify_log to /usr/local/maldetect/logs/inotify_log-20250225: Permission denied

This error is caused because the maldet logs no longer have the correct SELinux context. You can fix it using the commands below:

semanage fcontext -a -t var_log_t "/usr/local/maldetect/logs(/.*)?" > /dev/null 2>&1
restorecon -R -F /usr/local/maldetect/logs/ 2>/dev/null
  • inotify, selinux
  • 0 用戶發現這個有用
這篇文章有幫助嗎?

相關文章

How can I fix the error: Kohana_Exception [ 0 ]: Directory APPPATH/cache must be writable?

This error means that the permissions on the Plesk extension are not set properly. Running the...

How can I fix the error: The domain limit of this license key has been reached?

The admin and pro versions of our products are limited to the number of domains you can have in...

How can I repair my Sentinel Anti-malware installation?

If your Sentinel Anti-malware installation is having problems it is recommended to go though the...

The maldet real-time monitoring daemon will not start. How can I fix this?

1. Double check that the default_monitor_mode is set: Edit /usr/local/maldetect/conf.maldet and...

I received an email from Maxmind that they will drop support for unsecure database downloads. How are your products affected?

MaxMind sent out the following email below: To ensure that you can continue to download GeoIP...