Problems with permissions with roundcube database

  • 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)



    Code
    1. 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


    Code
    1. engine/PerlLib/Addons/roundcube.pm: $database->set('DATABASE_NAME', 'imscp_roundcube');
    2. engine/PerlLib/Addons/roundcube/installer.pm: $cfg->{'DB_NAME'} = ($_ eq 'imscp.pw.changer.inc.php') ? $main::imscpConfig{'DATABASE_NAME'} : 'imscp_roundcube';
    3. 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.

  • what happens if your copy ispcp_roundcube database to imscp_roundcube before update?

    Edited once, last by flames ().


  • Hello


    Thank you for your report. I'll fix.

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206


  • Great, I'll be following this ..


    Re;


    Should be fixed in last master. See https://github.com/i-MSCP/imsc…908fcbca03bffe398ac4dfade


    Thank you for your report.

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206