I am testing the upgrade from ispcp to roundcube, with the current master (5add95f31cccfc9885f31d938a9d766b58df33b3) there is an issue when the database name is different from 'imscp'.
The problem is that the GRANT statements are properly applied (using DATABASE_NAME_roundcube, using the DATABASE_NAME syntax), so the user 'roundcube_user' has access to DATABASE_NAME_roundcube (in my case ispcp_roundcube)
- mysql> SHOW GRANTS FOR 'roundcube_user'@'localhost';+-----------------------------------------------------------------------------------------------------------------------+| Grants for roundcube_user@localhost |+-----------------------------------------------------------------------------------------------------------------------+| GRANT USAGE ON *.* TO 'roundcube_user'@'localhost' IDENTIFIED BY PASSWORD '*0CAJHGAJGHQ******************' || GRANT ALL PRIVILEGES ON `ispcp_roundcube`.* TO 'roundcube_user'@'localhost' || GRANT SELECT, UPDATE ON `ispcp`.`mail_users` TO 'roundcube_user'@'localhost' |+-----------------------------------------------------------------------------------------------------------------------+
The problem is that the database for roundcube is hardcoded in several places
- engine/PerlLib/Addons/roundcube.pm: $database->set('DATABASE_NAME', 'imscp_roundcube');
- engine/PerlLib/Addons/roundcube/installer.pm: $cfg->{'DB_NAME'} = ($_ eq 'imscp.pw.changer.inc.php') ? $main::imscpConfig{'DATABASE_NAME'} : 'imscp_roundcube';
- engine/PerlLib/Addons/roundcube/installer.pm: my $dbName = 'imscp_roundcube';
So when the setup tries to configure the database imscp_roundcube, the user doesn't have enough permissions and fails, hence stopping the installation.
Even trying to apply the GRANT manually, it doesn't work, because the user roundcube_user is recreated with the shown permssions.