Sponsor:

Server and Web Integrator
Link:
Kloxo-MR logo
6.5.0 or 7.0.0
Click for "How to install"
Donation/Sponsorship:
Kloxo-MR is open-source.
Donate and or Sponsorship always welcome.
Click to:
Click Here
Please login or register. 2024-03-19, 04:01:07

Author Topic: setup-roundcube script  (Read 3515 times)

0 Members and 1 Guest are viewing this topic.

Offline tochits

  • Junior Member
  • *
  • Posts: 39
  • Karma: +0/-0
    • View Profile
setup-roundcube script
« on: 2017-05-17, 10:16:41 »
I found a problem with /script/setup-roundcube:
Code: [Select]
...
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.

Offline tochits

  • Junior Member
  • *
  • Posts: 39
  • Karma: +0/-0
    • View Profile
Re: setup-roundcube script
« Reply #1 on: 2017-05-17, 10:23:23 »
To add, this is original code from setup-roundcube.php:

Code: [Select]
        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'.

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: setup-roundcube script
« Reply #2 on: 2017-05-17, 12:41:03 »
Will be fixed in next update.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline neo76

  • Valuable Member
  • *
  • Posts: 51
  • Karma: +0/-0
    • View Profile
Re: setup-roundcube script
« Reply #3 on: 2017-06-02, 15:29:10 »
Thx in advanced!  :D

 


MRatWork Affiliates:    BIGRAF(R) Inc.    House of LMAR    EFARgrafix
Click Here

Page created in 0.032 seconds with 18 queries.

web stats analysis