I use .Net 8.0 for my app that should create database files on the fly if they don't exist.
I'm forwarding a Firebird Docker container to localhost port 3051 for debugging purposes, connection string is still the one one the container, and looks as follows :
datasource=localhost;database=\firebird\data\dbname.FDB;user id=SYSDBA;password=********;port number=3051;dialect=3;pooling=False;server type=0;character set=UTF8;connection lifetime=15;min pool size=0;max pool size=50;packet size=8192;wire crypt=Enabled
The problem occurs when I try to create a database in a sub-folder on the host, e.g. at /firebird/data/subfolder/mydb.FDB by calling:
FbConnection.CreateDatabase("datasource=localhost;database=\firebird\data\subfolder\mydb.FDB;...", 8192);
This returns the following error:
Use of database at location /tmp/\firebird\data\subfolder\mydb.FDB is not allowed by server configuration
Where is this /tmp/ coming from? (also, there seem to be some issues with forward and backward slashes, because in debug mode I use Windows, but the app will be deployed as a Linux-based Docker container).
On the Linux-based server, the error message looks as follows:
Use of database at location /tmp/firebird/data/Open/1.FDB is not allowed by server configuration
Note that I made sure the sub-folder exists on the host and has the same privileges than the /firebird/data folder (the bonus here would be if the FbConnection could create sub-directories if required).