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

Roundcube file_put_contents(/var/log/plesk-roundcube/errors): failed to open stream

 
centoscloudlinuxmailphpplesk onyx

Symptoms

  • Plesk Onyx 17.8 is installed on CentOS, RedHat or CloudLinux;

  • When Roundcube webmail is used, the following errors are written to the /var/log/httpd/error_log:

    mod_fcgid: stderr: PHP Warning: file_put_contents(/var/log/plesk-roundcube/errors): failed to open stream: Permission denied in /usr/share/psa-roundcube/program/lib/Roundcube/rcube.php on line 1259, referer: http://webmail.example.com/

  • SELinux is in 'Enforced' state:

    # getenforce
    Enforcing

  • SELinux security context for the /var/log/plesk-roundcube/sendmail is:

    # ls -lZ /var/log/plesk-roundcube/sendmail
    -rw-r-----. roundcube_sysuser roundcube_sysgroup system_u:object_r:cron_log_t:s0

  • /var/log/audit/audit.log contains thу following error message:

    audit(1521791921.029:461): avc: denied { open } for pid=9978 comm="php-cgi" path="/var/log/plesk-roundcube/sendmail" dev="sda2" ino=1286680 scontext=system_u:system_r:httpd_sys_script_t:s0 tcontext=system_u:object_r:cron_log_t:s0 tclass=file

Cause

Incorrect security context type cron_log_t set to Roundcube log files, the correct one is var_log_t.

It is a Plesk bug with ID #PPP-35816, which is considered to be fixed in one of the next Plesk updates.

Resolution

  1. Connect to the server through SSH

  2. Execute the commands below to set valid SELinux type (var_log_t):

    # semanage fcontext -a -t var_log_t /var/log/plesk-roundcube/sendmail
    # semanage fcontext -a -t var_log_t /var/log/plesk-roundcube/errors
    # restorecon -R /var/log/plesk-roundcube/

  3. Verify that changes were applied properly:

    # ls -lZ /var/log/plesk-roundcube/sendmail
    -rw-r-----. roundcube_sysuser roundcube_sysgroup system_u:object_r:var_log_t:s0

    # ls -lZ /var/log/plesk-roundcube/errors
    -rw-r-----. roundcube_sysuser roundcube_sysgroup system_u:object_r:var_log_t:s0

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

Linux Logs Explained

Read More »

Ruby on Rails vs PHP: Which one’s right for your needs?

Read More »

WP Toolkit 6.2 Release Now Available

Read More »
Knowledge Base

How to change PHP version for webmail in Plesk for Linux?

Read More »

Installing Plesk updates fails due to failed authorization on Imunify360 repositories: [Errno 14] HTTP Error 401 – Unauthorized

Read More »

Mail accounts cannot log into Plesk web interface if password is encrypted

Read More »

Outgoing mail control does not work in Plesk: Unable to execute mailmng-outgoing: no such table

Read More »

Hosting Wiki

  • Content Security Policy ( CSP )
  • Server Redundancy
  • RoundCube
  • QMAIL
  • Sendmail
  • Bare Metal Server
  • PhpMyAdmin
  • phpPgAdmin
  • Oracle VM Server
  • Server Virtualization Software
  • Windows Server
  • Linux
  • PHP
  • Plesk
  • Web Server
  • DNS Server
  • SSH
  • Email Autoresponder
  • Mailing Lists
  • Email Alias
  • Email Virus Protection
  • Email Forwarding
  • Webmail
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