Skip to content
  • Solutions
    By Role
    • For Developers
    • For Content Managers
    • For Agencies
    • For IT Admins
    • For Web Hosters
    • For Developers
    • For Content Managers
    • For Agencies
    • For IT Admins
    • For Web Hosters
    By Infrastructure
    • Overview
    • AWS
    • Microsoft Azure
    • Alibaba Cloud
    • Google Cloud Platform
    • Vultr
    • Overview
    • AWS
    • Microsoft Azure
    • Alibaba Cloud
    • Google Cloud Platform
    • Vultr
    • Digital Ocean
    • Linode
    • Upcloud
    • Oracle
    • OVH
    • Digital Ocean
    • Linode
    • Upcloud
    • Oracle
    • OVH
  • Product
    • Plesk Features
    • Plesk Editions
    • What’s new
    • Pricing
    • Roadmap
    • Lifecycle Policy
    • Extensions Catalogue
  • Pricing
  • Extensions
    Featured Extensions
    • SocialBee
    • WP Toolkit
    • Sitejet Builder for Plesk
    • SEO Toolkit
    • Joomla! Toolkit
    • Premium Email
    • Email Security
    • SocialBee
    • WP Toolkit
    • Sitejet Builder for Plesk
    • SEO Toolkit
    • Joomla! Toolkit
    • Premium Email
    • Email Security
    Bundles and packs:
    • Business and Collaboration Edition
    • WP pack
    • Hosting pack
    • Power pack
    • Language pack
    • Business and Collaboration Edition
    • WP pack
    • Hosting pack
    • Power pack
    • Language pack

    See all Extensions

  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
  • Pricing
  • Solutions
    • By Role
      • For Developers
      • For Content Managers
      • For Agencies
      • For IT Admins
      • For Web Hosters
    • By Infrastructure
      • Overview
      • Plesk on Amazon Web Services (AWS & Lightsail)
      • Microsoft Azure
      • Alibaba Cloud
      • Google Cloud Platform
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
      • Oracle
      • OVH
  • Products
  • Pricing
  • Extensions
    • Featured Extensions
      • SocialBee
      • WP Toolkit
      • Sitejet Builder for Plesk
      • SEO Toolkit
      • Joomla! Toolkit
      • Premium Email
      • Email Security
    • Bundles and packs:
      • Business and Collaboration Edition
      • WP pack
      • Hosting pack
      • Power pack
      • Language pack
      • See all Extensions
  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate Program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
  • Pricing
  • Solutions
    • By Role
      • For Developers
      • For Content Managers
      • For Agencies
      • For IT Admins
      • For Web Hosters
    • By Infrastructure
      • Overview
      • Plesk on Amazon Web Services (AWS & Lightsail)
      • Microsoft Azure
      • Alibaba Cloud
      • Google Cloud Platform
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
      • Oracle
      • OVH
  • Products
  • Pricing
  • Extensions
    • Featured Extensions
      • SocialBee
      • WP Toolkit
      • Sitejet Builder for Plesk
      • SEO Toolkit
      • Joomla! Toolkit
      • Premium Email
      • Email Security
    • Bundles and packs:
      • Business and Collaboration Edition
      • WP pack
      • Hosting pack
      • Power pack
      • Language pack
      • See all Extensions
  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate Program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
Plesk 360 login
Free Trial

Knowledge Base

Plesk Administrator receives emails from cron: stat of /var/ossec/logs/ossec.log failed: Permission denied

 
cronemailfirewallimunify360plesk for linux

Symptoms

  • An email from cron.daily is sent with the following content:

    /etc/cron.daily/logrotate:
    error: stat of /var/ossec/logs/active-responses.log failed: Permission denied
    error: stat of /var/ossec/logs/ossec.log failed: Permission denied

  • Permissions on the files mentioned in the error log are correct (644 and owner ossec):

    # ls -l /var/ossec/logs/
    total 440
    -rw-r--r--. 1 ossec ossec 0 Mar 26 03:26 active-responses.log
    drwxrwx---. 4 ossec ossec 67 Apr 13 00:00 alerts
    drwxr-x---. 4 ossec ossec 50 Apr 13 00:00 archives
    drwxr-x---. 4 ossec ossec 50 Apr 13 00:00 firewall
    -rw-r--r--. 1 ossec ossec 13024 Apr 12 10:47 ossec.log

Cause

SELinux blocks access to logfiles located in /var/ossec/logs (part of Imunify360) during log rotation.

Resolution

Adjust the SELinux configuration for the log directory:

  1. Connect to the Plesk server via SSH.

     

  2. Adjust the SELinux configuration for the log directory:

    # checkmodule -M -m -o /var/imunify360/imunify360.mod

    # /opt/imunify360/venv/share/imunify360/imunify360.te

    # semodule_package -o /var/imunify360/imunify360.pp -m /var/imunify360/imunify360.mod

    # semodule -i /var/imunify360/imunify360.pp

    # semanage fcontext -a -t var_log_t '/var/ossec/logs(/.*)?'

    # restorecon -Frvv /var/ossec/logs

     

  3. Restart OSSEC and Imunify360 services:

    # systemctl restart ossec-hids

    # service imunify360 restart

Tweet
Share
Share
Email
0 Shares
Read the full article
Related Posts

Cron Jobs: All You Need To Know

Read More »

The Plesk HoliDeals Calendar is back (Part 1)

Read More »

WordPress Firewall – Why Do You Need One?

Read More »
Knowledge Base

Email notifications are received daily from a Plesk server: /etc/cron.daily/imunify360-firewall exited with return code 127

Read More »

Plesk administrator receives Anacron “cron.daily” notifications

Read More »

Emails can not be delivered over IPv6 addresses on Plesk with Digital Ocean

Read More »

Plesk Premium Email is slow or error 504 is displayed: Connection timed out after 10000 milliseconds

Read More »

Hosting Wiki

  • Server Redundancy
  • Bare Metal Server
  • Oracle VM Server
  • Server Virtualization Software
  • Windows Server
  • Linux
  • Plesk
  • Web Server
  • DNS Server
  • SSH
  • Firewall
  • Cron Jobs
  • Email Autoresponder
  • Email Alias
  • Email Virus Protection
  • Email Forwarding
X-twitter Linkedin Youtube Reddit Github
  • Product
  • Login
  • Pricing
  • Editions
  • For Partners
  • Partner Program
  • Contributor Program
  • Affiliate Program
  • Plesk University
  • Company
  • Blog
  • Careers
  • Events
  • About Plesk
  • Our Brand
  • Resources
  • User and Admin guides
  • Help Center
  • Migrate to Plesk
  • Contact Us
  • Hosting Wiki
  • Forum
  • Legal
  • Legal
  • Privacy Policy
  • Imprint

© 2025 WebPros International GmbH

Part of the WebPros®  Family