3

When ever I try to connect with Firebird SQL I get this error,

firebird$ isql-fb 'db.FDB' -u SYSDBA -p <PASS>

Statement failed, SQLSTATE = 08001
I/O error during "open" operation for file "CAFW.FDB"
-Error while trying to open file
-Permission denied
Use CONNECT or CREATE DATABASE to specify a database

What can I do to resolve it, I've already ensured that my current user has read/write access to the file.

$ sudo chown firebird:firebird ./db.FDB
$ sudo chmod 770 ./db.FDB # should only need 660


$ ls -lah
-rw-rw---- 1 firebird firebird 53M May  2 17:13 CAFW.FDB
Evan Carroll
  • 65,432
  • 50
  • 254
  • 507

3 Answers3

2

You need to add yourself in the Firebird group

sudo adduser `id -un` firebird 

or always use localhost address in front of db if Server is Classic or SuperClassic

See the long thread here http://firebird.1100200.n4.nabble.com/Fwd-Have-you-tried-firebird-2-5-SuperClassic-from-the-packages-td3053790.html

Mariuz
  • 141
  • 2
0

I have same mysterious problem with setup. OS is debian 11 arm64. User is member of group firebird, but can only connect from isql-fb if run isql-fb as root user. Prefix of file path with localhost: makes no difference. Eventually I found that the database file had been created with owner as root:root, and required chown firebird:firebird

0

If your home is on an encrypted directory the daemon itself won't be able to read that home directory regardless of what the permissions are.

You feed isql-fb a filename, but that file isn't read by isql-fb but by fbserver which won't have access to an encrypted mount regardless of what the perms are.

Evan Carroll
  • 65,432
  • 50
  • 254
  • 507