Public bug reported:

The roundcube-core package contains this cron job:
0   5  *   *   *   www-data test -x /usr/share/roundcube/bin/cleandb.sh && 
/usr/share/roundcube/bin/cleandb.sh >/dev/null

The Roundcube packages do not install configuration files for any
webserver so they should not presume that it will be possible to run a
daily cron job as the unprivileged "www-data" user.

This user does not have access to the Roundcube configuration files and
it definitely doesn't have access to the database.

This results in a daily email where the script tries to access the default 
mysql database because it can't read the custom config file:
PHP Fatal error:  Uncaught Error: Undefined class constant 
'MYSQL_ATTR_FOUND_ROWS' in 
/usr/share/roundcube/program/lib/Roundcube/rcube_db_mysql.php:144
Stack trace:
#0 /usr/share/roundcube/program/lib/Roundcube/rcube_db.php(153): 
rcube_db_mysql->dsn_options(Array)
#1 /usr/share/roundcube/program/lib/Roundcube/rcube_db.php(138): 
rcube_db->conn_create(Array)
#2 /usr/share/roundcube/program/lib/Roundcube/rcube_db.php(231): 
rcube_db->dsn_connect(Array, 'w')
#3 /usr/share/roundcube/program/include/rcmail_utils.php(47): 
rcube_db->db_connect('w')
#4 /usr/share/roundcube/program/include/rcmail_utils.php(271): 
rcmail_utils::db()
#5 /usr/share/roundcube/bin/cleandb.sh(31): rcmail_utils::db_clean(7)
#6 {main}
  thrown in /usr/share/roundcube/program/lib/Roundcube/rcube_db_mysql.php on 
line 144

The cron job needs to be removed or put in a separate package
specifically for running Roundcube in a specific webserver environment
where shared users like "www-data" are used.

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: roundcube-core 1.3.6+dfsg.1-1
ProcVersionSignature: Ubuntu 4.15.0-117.118-generic 4.15.18
Uname: Linux 4.15.0-117-generic x86_64
ApportVersion: 2.20.9-0ubuntu7.17
Architecture: amd64
Date: Sun Sep 20 08:46:16 2020
InstallationDate: Installed on 2016-03-31 (1633 days ago)
InstallationMedia: Ubuntu-Server 15.10 "Wily Werewolf" - Release amd64 
(20151021)
PackageArchitecture: all
SourcePackage: roundcube
UpgradeStatus: Upgraded to bionic on 2020-09-19 (0 days ago)
modified.conffile..etc.roundcube.plugins.jqueryui.config.inc.php: 
[inaccessible: [Errno 13] Permission denied: 
'/etc/roundcube/plugins/jqueryui/config.inc.php']

** Affects: roundcube (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug bionic third-party-packages

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1896366

Title:
  roundcube tries to run cleandb.sh as unprivileged www-data user from
  cron

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/roundcube/+bug/1896366/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to