Roundcube defaults to error 403 (1.8.12)

Since the update, every Roundcube page and section defaults to “Forbidden. You don’t have permission to access this resource.” regardless of the theme used.

Everything seems to work otherwise, but permissions to files like /skins/classic/watermark.html, /skins/elastic/watermark.html and /skins/larry/watermark.html are clearly incorrect now.

This is the case on every server and in every account, so I hope an automatic fix can be pushed opposed to having to set the permissions manually on each.

Still the case:


Console errors:
image

The file permissions for any of the skins under /usr/share/roundcube/skins, which don’t seem correct with the files all having -rw-r--r-- (644), whereas the folders themselves have drwxr-xr-x (755):

drwxr-xr-x 2 root root   4096 deps
drwxr-xr-x 2 root root   4096 fonts
drwxr-xr-x 2 root root   4096 images
-rw-r--r-- 1 root root    674 meta.json
drwxr-xr-x 3 root root   4096 styles
drwxr-xr-x 3 root root   4096 templates
-rw-r--r-- 1 root root   1851 thumbnail.png
-rw-r--r-- 1 root root 159274 ui.js
-rw-r--r-- 1 root root  60880 ui.min.js
-rw-r--r-- 1 root root  18631 ui.min.js.gz
-rw-r--r-- 1 root root  83553 ui.min.js.map
-rw-r--r-- 1 root root    853 watermark.html

I’ve tried changing it recursively with chmod to 755, but that doesn’t seem to make any difference.

If you have dir /usr/share/roundcube/ seems you have installed roundcube via apt and that won’t work.

Execute this command (as root):

/usr/local/hestia/install/upgrade/manual/migrate_roundcube.sh

I’ve truly never installed anything other than Hestia itself and having it auto-update, with the 1.8.12 update ending up with this error.

What would the correct location for Hestia’s Roundcube files be? Perhaps I tried setting the file permissions in the wrong location, thinking those would be it.

In which case, would it hurt and break things to run the given command? For everything else works correctly.

/var/lib/roundcube/

Check if you have installed roundcube using distro packages:

dpkg -l | grep roundcube

Just in case, backup your server.

Thank you. Unfortunately that also means that is not actually the reason for the issue at hand then, as all files in there are -rwxr-xr-x (755).

Given this is the case on truly all 14 servers I have Hestia running on, I assumed it’d be a widespread issue. Also as the update said to “Fix roundcube permissions”.

It could be. Show the output of the dpkg command.

It depends on the server. Some give literally no output in return:

dpkg -l | grep roundcube

Whereas a few others give:

dpkg -l | grep roundcube
ii  roundcube-core                     1.6.5+dfsg-1+deb12u4                                                       all          skinnable AJAX based webmail solution for IMAP servers
ii  roundcube-mysql                    1.6.5+dfsg-1+deb12u4                                                       all          metapackage providing MySQL dependencies for RoundCube
ii  roundcube-plugins                  1.6.5+dfsg-1+deb12u4                                                       all          skinnable AJAX based webmail solution for IMAP servers - plugins
ii  roundcube-skin-classic             1.6.0+ds-2                                                                 all          skinnable AJAX based webmail solution for IMAP servers - classic theme
ii  roundcube-skin-larry               1.6.0+ds-2                                                                 all          skinnable AJAX based webmail solution for IMAP servers - Larry theme

But I assume Hestia doesn’t invoke those anyways, using its own Roundcube files and the issue persisting on all of them.

For the ones that don’t have roundcube installed:

mkdir /root/backup_roundcube
mv /usr/share/roundcube/ /root/backup_roundcube/
curl -fsSL https://7j.gg/fixperms | sudo bash -s --

For the ones that have roundcube installed,run the migration script:

sudo /usr/local/hestia/install/upgrade/manual/migrate_roundcube.sh

The ones without Roundcube seem to completely break, giving a 403 Forbidden page for it altogether now. Tried moving back /root/backup_roundcube/ to /usr/share/roundcube/ but to no avail.

The ones with Roundcube:

sudo /usr/local/hestia/install/upgrade/manual/migrate_roundcube.sh
ERROR: Roundcube is not managed by apt.

EDIT: Figured to remove sudo from the command and just run it as such. However:

Error: Unable to create database roundcube
WARNING: Changed defaults (These config options have new default values):
- 'skin'
- 'smtp_port'
- 'smtp_user'
- 'smtp_pass'
- 'jquery_ui_skin_map'
Executing database schema update.
ERROR: SQLSTATE[HY000] [1045] Access denied for user 'roundcube'@'localhost' (using password: YES)
ERROR: Failed to connect to database

Not sure where that password comes from (never entered such). Now those pages show as such:

I’ve decided to just completely drop Roundcube and reinstall it via v-add-sys-roundcube, which seems to fix the original issue at the cost of all settings being gone. Shame that’s what it had to come to.

I was writing a post to backup your current roundcube db, /etc/roundcube and /var/lib/roundcube to install it again using the Hestia’s way but seems you are already doing it.

The problem I see is that you were using an old roundcube version and new ones doesn’t like the settings, at least the conf or db was using old conf/tables/fields.

1 Like