Plesk

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

Symptoms

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

Exit mobile version