ISPC fails to give permission to mysql tables with underscores
short description
Created a new database with name c1_stammbaum and a user with the same name. Granting the user access to the database does not work. Access is granted to c1\\_stammbaum
instead of c1\_stammbaum
correct behaviour
Grant access to correct database
environment
Server OS: Debian 10.5; Server OS version: Buster; ISPConfig version: (3.1dev); MariaDB Ver 15.1 Distrib 10.3.23-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2
Debug log
19.09.2020-01:47 - DEBUG - Info: php.ini change checking not enabled or not in this minute: 0
19.09.2020-01:47 - DEBUG - Found 2 changes, starting update process.
19.09.2020-01:47 - DEBUG - Calling function 'db_user_update' from plugin 'mysql_clientdb_plugin' raised by event 'database_user_update'.
19.09.2020-01:47 - DEBUG - Processed datalog_id 5844
19.09.2020-01:47 - DEBUG - Calling function 'db_update' from plugin 'mysql_clientdb_plugin' raised by event 'database_update'.
19.09.2020-01:47 - DEBUG - Calling GRANT for c1_stammbaum with access rw and hosts localhost
19.09.2020-01:47 - DEBUG - GRANT for user c1_stammbaum at host localhost
19.09.2020-01:47 - DEBUG - CREATE USER 'c1_stammbaum'@'localhost'
19.09.2020-01:47 - DEBUG - PASSWORD SET FOR 'c1_stammbaum'@'localhost' success? yes
19.09.2020-01:47 - DEBUG - GRANT ALL PRIVILEGES ON 'c1\\_stammbaum'.* TO 'c1_stammbaum'@'localhost' success? yes
19.09.2020-01:47 - DEBUG - Processed datalog_id 5845
19.09.2020-01:47 - DEBUG - Remove Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
Looks like the problem is that the privileges are granted to 'c1\\_stammbaum'
instead of 'c1\_stammbaum'
. Temporarily fixed with GRANT ALL PRIVILEGES ON 'c1\_stammbaum'.* TO 'c1_stammbaum'@'localhost';
In the past this worked, so somewhere the second slash was introduced.
Edited by Johannes