MRatWork Forum by Mustafa Ramadhan
Sawo Project - Kloxo-MR Discussions => Kloxo-MR Bugs and Requests => Topic started by: tochits on 2017-05-17, 10:16:41
-
I found a problem with /script/setup-roundcube:
...
for x in defaults.inc.php db.inc.php config.inc.php ; do
if [ -f ${path}/config/${x} ] ; then
'cp' -f ${path}/config/roundcube_${x} ${path}/config/${x}
sed -i "s!mysql://roundcube:roundcube!mysql://roundcube:${pass}!g" ${path}/config/${x}
sed -i "s!mysql://roundcube:pass!mysql://roundcube:${pass}!g" ${path}/config/${x}
sed -i "s!mysql://roundcube:@!mysql://roundcube:${pass}!g" ${path}/config/${x}
fi
done
chown -R apache:apache ${path}
Q1="USE roundcubemail;"
Q2="GRANT ALL ON roundcubemail.* TO roundcubemail@localhost IDENTIFIED BY '${pass}';"
Q3="FLUSH PRIVILEGES;"
SQL="${Q1}${Q2}${Q3}"
...
As seen in the code above, the config files are set to use 'roundcube' but the SQL statements to grant access has the user 'roundcubemail' instead.
-
To add, this is original code from setup-roundcube.php:
if (file_exists("{$path}/config/roundcube_config.inc.php")) {
lxfile_cp("{$path}/config/roundcube_config.inc.php", "{$path}/config/config.inc.php");
$cfgfile = "{$path}/config/config.inc.php";
$content = lfile_get_contents($cfgfile);
$content = str_replace("mysql://roundcube:roundcube", "mysql://roundcube:" . $pass, $content);
$content = str_replace("mysql://roundcube:pass", "mysql://roundcube:" . $pass, $content);
$content = str_replace("mysql://roundcube:@", "mysql://roundcube:" . $pass . "@", $content);
lfile_put_contents($cfgfile, $content);
}
$result = $link->query("GRANT ALL ON roundcubemail.* TO roundcube@localhost IDENTIFIED BY '{$pass}'");
$link->query("flush privileges");
As shown, both config files and SQL grant query consistently have the user as 'roundcube'.
-
Will be fixed in next update.
-
Thx in advanced! :D