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)

    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

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


  • Great, I'll be following this ..


    Should be fixed in last master. See…908fcbca03bffe398ac4dfade

    Thank you for your report.