jacobalberty / firebird-docker

Firebird Dockerfile
130 stars 96 forks source link

Permissions issue for new database? #15

Closed gamesbook closed 7 years ago

gamesbook commented 7 years ago

I am not sure where in the chain of events the cause is, but this is the problem.

From inside the container, running isql:

SQL> CONNECT "/databases/TEST.FDB";
Statement failed, SQLSTATE = 08001
I/O error during "open" operation for file "/databases/TEST.FDB"
-Error while trying to open file
-No such file or directory

From the command line:

# ls -al /databases/             
total 796
drwxrwxr-x  2 1024 1025   4096 Mar 15 12:04 .
drwxr-xr-x 35 root root   4096 Mar 15 11:58 ..
-rw-rw----  1 root root 802816 Mar 15 12:05 TEST.DB

This database was created via a Python script using the fdb module:

    sql = "create database '%s/%s:%s' user '%s' password '%s'" % (
        host_IP, port, database, user, password
    )
    con = fdb.create_database(sql)

The databases directory is mapped to the container in the usual way, via docker-compose:

    volumes:
        - /path/to/firebird/data:/databases/
        - /path/to/firebird/logs:/var/firebird/log
jacobalberty commented 7 years ago

If those command outputs are copy and pasted correctly it looks like the db is named test.db and you're trying to access test.fdb from isql

gamesbook commented 7 years ago

Yes; you are correct. Yet another Silly Error. Apologies.