On 18/8/25 15:52, 'liviuslivius' via firebird-support wrote:
> Hi
>
> Are you sure that you are talking about embedded access? If yes, then
> no security at all. You can connect as sysdba without password at all
> in embeded mode, or simply copy database file and doing anything with it.
>
Hi,
Yes, absolutely embedded access. The server is stopped, just in case.
Access works, but "SHOW GRANTS" fails, as does "REVOKE ALL ON ALL".
I can reproduce this in a Linux container too, "chmod 0 security5.fdb"
and then SHOW GRANTS fails:
root@4b3a8e7c6cfb:/tmp/Firebird-5.0.3.1683-0-linux-x64/opt/firebird/bin#
./isql
Use CONNECT or CREATE DATABASE to specify a database
SQL> create database 'foo.fdb';
SQL> show grants ;
There is no privilege granted in this database
root@4b3a8e7c6cfb:/tmp/Firebird-5.0.3.1683-0-linux-x64/opt/firebird/bin#
chmod 0 ../security5.fdb
root@4b3a8e7c6cfb:/tmp/Firebird-5.0.3.1683-0-linux-x64/opt/firebird/bin#
./isql
Use CONNECT or CREATE DATABASE to specify a database
SQL> connect 'foo.fdb';
Database: 'foo.fdb', User: SYSDBA
SQL> show grants ;
Statement failed, SQLSTATE = 28000
no permission for read-write access to database
/tmp/Firebird-5.0.3.1683-0-linux-x64/opt/firebird/security5.fdb
-IProvider::attachDatabase failed when working with CREATE DATABASE grants
There is no privilege granted in this database
SQL> revoke all on all from public ;
Statement failed, SQLSTATE = 28000
unsuccessful metadata update
-REVOKE failed
-no permission for read-write access to database
/tmp/Firebird-5.0.3.1683-0-linux-x64/opt/firebird/security5.fdb
The security database location can be changed in database.conf, so maybe
I can make a temporary configuration file and security database in a
writable directory? But I'm not sure how to refer to a configuration
file outside of the Firebird program file directory.
Hamish