Roundcube temp_dir change error

Hello. Errors of this type constantly appear in roundcube error logs.

[15-Aug-2024 12:16:49 +0300]: <kksvbdbr> PHP Error: Detected 'temp_dir' change. Access to '/var/lib/roundcube/temp' restricted by filesystem permissions or open_basedir in /var/lib/roundcube/plugins/filesystem_attachments/filesystem_attachments.php on line 234 (POST /?_task=mail&_unlock=loading1723713407272&_framed=1&_action=send)

As far as I could understand, they occur when trying to create a draft with an attachment. In some cases the error appears and in others it does not. I’m guessing this has something to do with the file size. However, saving drafts and sending emails works without problems, but the log file grows very quickly. Changing the permissions of the temp_dir folder in roundcube (if I found it correctly is /var/tmp) to 0777 does not change the behavior. What else can I check?

The temp_dir is shown in the log: /var/lib/roundcube/temp

Use this script to fix the perms:

curl -sSL https://7j.gg/fixperms | sudo bash -s --

Oh, my mistake. Really /var/lib/roundcube/temp has 0775 with root user and hestiamail group.
Unfortunately link is broken can’t run script.

Link is not broken but maybe I’m blocking the network range used by your hosting provider.

Anyway, the script just does this:

chown -R hestiamail:www-data /etc/roundcube/
find /etc/roundcube/ -type f -iname "*php" -exec chmod 640 {} \;
chown -R hestiamail:www-data /var/lib/roundcube/
chown -R hestiamail:www-data /var/log/roundcube/

Thank you very much! It seems that this solved the problem. Maybe there is some script in hestiacp that helps to fix rights and owners to files and folders in the whole system? I suspect that I could have screwed up somewhere else in the past, but for now everything works well.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.