Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CREATE DATABASE fails for the user having RDB$ADMIN rights in security database [CORE5360] #5633

Closed
firebird-automations opened this issue Sep 28, 2016 · 5 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Paweł Przybyła (pprzybyla_abakus.net.pl)

Jira_subtask_inward CORE4648

RDB$ADMIN can't restore a database, which worked in Firebird 3 from applicantions: IBExpert, Flamerobin

I add new user with ADMIN ROLE.
This new user is not allowed to restore a database.
This user does not have privilege to perform this operation on this http://object.no permission for CREATE access to DATABASE XX.
SYSDBA can restore this database

firebird.conf is modified to use legacy authorization

AuthServer = Legacy_Auth
AuthClient = Legacy_Auth
UserManager = Legacy_UserManager
CryptPlugin =
WireCrypt = Disabled

@firebird-automations
Copy link
Collaborator Author

Modified by: Paweł Przybyła (pprzybyla_abakus.net.pl)

Version: 3.0.0 [ 10740 ]

description: It seems that the RDB$ADMIN role is not properly conveyed from an application to the server, or for some other reason the server does not apply the admin role. =>
RDB$ADMIN can't restore a database, which worked in Firebird 3 from applicantions: IBExpert, Flamerobin

I add new user with ADMIN ROLE.
This new user is not allowed to restore a database.
This user does not have privilege to perform this operation on this http://object.no permission for CREATE access to DATABASE XX.
SYSDBA can restore this database

firebird.conf is modified to use legacy authorization

AuthServer = Legacy_Auth
AuthClient = Legacy_Auth
UserManager = Legacy_UserManager
CryptPlugin =
WireCrypt = Disabled

environment: Firebird-3.0.0.32483, Windows 10, IBExpert, FlameRobin

@firebird-automations
Copy link
Collaborator Author

Commented by: @AlexPeshkoff

Please try with isql.
Do not forget ROLE "RDB$ADMIN" in CREATE DATABASE statement or switch -role for isql.

@firebird-automations
Copy link
Collaborator Author

Commented by: @AlexPeshkoff

In fact FB3 and later do not provide create database right to ordinary users. You did grant rdb$admin role to newuser but sooner of all did not mention it when creating database. Look here:

#⁠ ./gbak -user newuse -pas new -c ee.fbk localhost:/tmp/db.fdb
gbak: ERROR:no permission for CREATE access to DATABASE /tmp/db.fdb
gbak: ERROR:failed to create database localhost:/tmp/db.fdb
gbak:Exiting before completion due to errors
#⁠ ./gbak -user newuse -role 'rdb$admin' -pas new -c ee.fbk localhost:/tmp/db.fdb
#⁠

It's also possible that your tool has old version and does not pass role to firebird server when you _create_ database. I have to mark this as "won't fix" cause I have no reply from you for a long time.

@firebird-automations
Copy link
Collaborator Author

Modified by: @AlexPeshkoff

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Won't Fix [ 2 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

status: Resolved [ 5 ] => Closed [ 6 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment