[MDEV-18884] GRANT ALL returns Access denied for user with GRANT OPTION Created: 2019-03-11 Updated: 2019-03-12 Resolved: 2019-03-12 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Authentication and Privilege System, Documentation |
| Affects Version/s: | 10.3.13 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Miroslav Lachman | Assignee: | Ian Gilfillan |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | GRANT, privileges, regression | ||
| Environment: |
FreeBSD 11.2-RELEASE-p7 amd64 GENERIC mariadb103-server-10.3.13 |
||
| Description |
|
We have some shell script to create new databases and users for new projects. This script has dedicated user account "sys_dbcreator" with slightly lower privileges than root user. It worked fine for all versions from MySQL 4.1 but stopped with MariaDB 10.3. We create new database in this shell script and then call GRANT ALL ON `newdb`. TO 'newuser'@'localhost';* Expected result: But we got an error:
Privileges which are granted to user sys_dbcreator:
If we use these listed privileges for user 'test000' on database `test000` then it works.
GRANT ALL ON `newdb`. TO 'newuser'@'localhost';* worked on all previous versions of MySQL from 4.1 to 5.5, then we migrated to MariaDB and it also worked for all tested versions to 10.2. MariaDB 10.3 does not work so I think this is a regression on how GRANT ALL works. |
| Comments |
| Comment by Elena Stepanova [ 2019-03-11 ] | ||||
|
It still works. However, in 10.3 there is a new privilege DELETE HISTORY which your sys_dbcreator is missing, so it doesn't have ALL on the database level anymore, and thus cannot grant it. greenman, please see if you find it worth specifically mentioning somewhere in the KB. The confusion is understandable. | ||||
| Comment by Miroslav Lachman [ 2019-03-11 ] | ||||
|
Ah, thanks for pointing me to DELETE HISTORY!
But when I check privileges it shows DELETE VERSIONING ROWS
I see it is mentioned in https://mariadb.com/kb/en/library/grant/ but it still is confusing if the table with privileges has DELETE HISTORY in the left column, but SHOW GRANTS shows DELETE VERSIONING ROWS ... | ||||
| Comment by Elena Stepanova [ 2019-03-11 ] | ||||
|
I agree, we also find it a bit confusing. There is a separate bug report about it, | ||||
| Comment by Ian Gilfillan [ 2019-03-12 ] | ||||
|
Have clarified and added the specific bug report to the docs |