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 Users Found This Useful
Was this answer helpful?

Related Articles

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...

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...

How can I fix the error: The licensing server was invalid or could not be reached ?

Restart Plesk Panel Interface 1. Many times this error can be fixed by just restarting the Plesk...