After installing the plugin for Calendar and Contacts Server attempts to update or add an event to the Calendar through Roundcube returns an error like the following.
No entries are seen in the user's local Roundcube file '/home/cpuser/logs/roundcube/errors.log' but when checking the CCS log file '/opt/cpanel-ccs/data/Logs/error.log' you see entries like the following.
[directoryproxy] [-] DirectoryProxyAMPFactory starting on './data/Logs/state/directory-proxy.sock'
[directoryproxy] [stderr#error] Traceback (most recent call last):
[directoryproxy] [stderr#error] raisedNow.raiseException()2021-06-03T19:38:45+0800 [directoryproxy] [stderr#error] File "<string>", line 2, in raiseException
[directoryproxy] [stderr#error] OSError: [Errno 2] No such file or directory
This behavior occurs when the CCS service is unable to bind a link to a necessary socket for log file handling. This causes an unknown error in Roundcube as the failure is within the CCS service. The failure to link this is known to be caused by the sysctl setting below being enabled on CloudLinux servers.
fs.protected_symlinks_create = 1
This is known to cause issues with many services provided by the cPanel software bundle. Due to this, CloudLinux advises this be disabled in their documentation. You can verify if this setting is enabled with the following command.
sysctl -a | grep symlinks_create
For further details, please visit the CloudLinux below documentation.
To resolve this error, you will need to disable the setting fs.protected_symlinks_create and restart the CCS service.
You can disable this in the active settings by using the following command.
sysctl -w fs.protected_symlinks_create=0
The CCS service can then be restarted using the following command.
After the service restart you can check the log file '/opt/cpanel-ccs/data/Logs/error.log' to confirm the errors have ceased. This will have addressed the Unknown Error reported in the interface.
While the above changes will address the Unknown Error; If the setting fs.protected_symlinks_create was enabled it most likely also prevented Roundcube from linking some existing users to their SQLite database as well.
If this has occurred for some users, they will instead see an internal error when creating/editing a Calendar events after the above workaround has been applied. The error would look like the following instead.
You can confirm if this is the cause by checking the existing symlinks in the related domains Roundcube database location. If no "latest" symlink is present for the related user, then the following solution would be expected to resolve this error. To check use a command like the below example, but by replacing the cpuser and domain.tld with the relevant cPanel/domain information.
find /home/cpuser/etc/example.com/ -type l
Expected output would look like the following:
To address this new error, you will need to update the SQLite databases for the affected cPanel account. This can be performed with a command like the following, but by replacing the cpuser entry with the actual cPanel account username.
/usr/local/cpanel/bin/update-roundcube-sqlite-db --user cpuser --force