Applicable to:
- Plesk for Linux
Symptoms
-
Roundcube fails to load with the following error message:
Oops... something went wrong!
An internal error has occurred. Your request cannot be processed at this time.
For administrators: Please check the application and/or server error logs for more information. -
Roundcube logs at
/var/log/plesk-roundcube/errors
:[10-Aug-2024 20:18:19 +0000]: <tmumr1mt> DB Error: SQLSTATE[HY000] [2002] Permission denied in /usr/share/psa-roundcube/program/lib/Roundcube/rcube_db.php on line 201 (GET /)
[10-Aug-2024 20:37:08 +0000]: <ag2a6ieh> DB Error: SQLSTATE[HY000] [2002] Permission denied in /usr/share/psa-roundcube/program/lib/Roundcube/rcube_db.php on line 201 (GET /roundcube/index.php?_user=example%40example.com) -
The logs at
/var/log/audit/audit.log
show the following information upon trying to load Roundcube:type=SYSCALL msg=audit(1723326065.263:28522): arch=c000003e syscall=42 success=no exit=-13 a0=6 a1=7ffdc6a2e980 a2=1b a3=1 items=0 ppid=4129 pid=109892 auid=4294967295 uid=976 gid=1006 euid=976 suid=976 fsuid=976 egid=1006 sgid=1006 fsgid=1006 tty=(none) ses=4294967295 comm="php-cgi" exe="/opt/plesk/php/8.2/bin/php-cgi" subj=system_u:system_r:httpd_sys_script_t:s0 key=(null)ARCH=x86_64 SYSCALL=connect AUID="unset" UID="roundcube_sysuser" GID="roundcube_sysgroup" EUID="roundcube_sysuser" SUID="roundcube_sysuser" FSUID="roundcube_sysuser" EGID="roundcube_sysgroup" SGID="roundcube_sysgroup" FSGID="roundcube_sysgroup"
-
Recovering the roundcubemail database from a daily dump does not resolve the issue.
Cause
Known MariaDB bug related to the SELinux context on MariaDB packages from mariadb.com:
- https://jira.mariadb.org/browse/MDEV-30520 for the wrong process label
- https://jira.mariadb.org/browse/MDEV-24941 for the socket.
Resolution
While there is no current solution to the bugs above, there is a workaround:
-
Connect to the server via SSH
-
Run the following commands in order:
# semanage fcontext -a -t mysqld_exec_t /usr/sbin/mariadbd
# restorecon -v /usr/sbin/mariadbd
# restorecon -v /var/lib/mysql/mysql.sock
# systemctl restart mariadb
Comments
2 comments
not working on ubuntu
Hi there NearEarthObject -- this article is specific to RHEL-derived systems, because SELinux does not exist on Ubuntu, thus this article is not applicable to your issue.
Try checking this article instead -- Roundcube webmail fails to load: Database error: connection failed! or Oops... something went wrong!
If the one above does not help, please open a ticket and I'll be happy to assist further.
Please sign in to leave a comment.