|
From: Christian M. S. <cm...@ce...> - 2005-09-18 17:01:42
|
Hi Markus,
On Sunday 18 September 2005 18.03, Markus Hoenicka wrote:
[..]
> Initially I've only used gsec to equip the SYSDBA account with a new
> password. I ran all tests using the SYSDBA user with that new
> password. To exclude any problems specific to this account, I've also
> created another account:
>
> GSEC> display
> user name uid gid full name
> ---------------------------------------------------------------------------
>--------------- SYSDBA 0 0
> MARKUS 1000 1000
>
> The uid and gid match my system account. I've repeated all tests using
> this account with the same results. I can create, access, and change
> the libdbitest database using the isql tool, but not through libdbi.
>
> As far as I understand the permission handling of Firebird, it makes a
> difference whether I use a local connection or a TCP connection. I use
> something like:
I'm not a firebird export either. On my system the user I'm using for firebird
isn't a regular user and was created running gsec as root.
GSEC> display
user name uid gid full name
------------------------------------------------------------------------------------------
SYSDBA 0 0
TESTUSER 0 0
>
> localhost:/home/markus/workspace/libdbi/firebird
>
> as the path in the iSQL CONNECT command and
>
> database directory? [.] /home/markus/workspace/libdbi/firebird
>
> database hostname? [(blank for local socket if possible)] localhost
I can run the test program either with localhost or just empty doesn't mather.
I can also run the test program as any user on my system. As long as I use the
valid db user testuser as the user for libdbi.
1 drivers available: firebird
test which driver? firebird
database administrator name? testuser
database administrator password? testpassword
database directory? [.] /opt/firebird
database hostname? [(blank for local socket if possible)] localhost
database name? [libdbitest] test.fdb
>
> in test_dbi. According to the docs this runs the server using its own
> account, not the users account. In my case, there is a firebird
> user. I've added this user to my group and changed the permissions of
> the above directory to group write access. This way the isql call
> which initially creates the database under the firebird account is
> allowed to do so. This actually results in a file created by
> firebird:markus.
>
> In order to exclude permission problems, I added a chmod call right
> after the isql command to change the database file to write access for
> all. test_dbi still segfaults when trying to access the database.
>
> > I have just tested the "make check" option and on my platform with a
> > user with correct rights, libdbi can create tables. Both from "make
> > check"'s test program and other applications written that uses libdbi.
> >
> > I will spend some time today trying to get the test program to run on
> > Linux and then it should run on freebsd as well.
>
> Could you elaborate a little further on how you handle permissions?
> Which user account and which permissions do you use? I may still miss
> a simple detail about the permission handling of firebird. I'm not
> sure whether I really grasp how the UNIX file permissions and the SQL
> permissions have to be set to allow me to connect.
The crazy thing about this is that my setup looks as simple as yours.
I have only used Firebird on Gentoo (and Windows in the form of Interbase many
years ago).
I really can see what is going on here. One thing that might be mentioned is
that I run the server as a superserver. I don't know exactly whats the
difference between superserver and classicserver but ....
libdbi driver directory? [/usr/local/lib/dbd]
1 drivers available: firebird
test which driver? firebird
database administrator name? testuser
database administrator password? testpassword
database directory? [.] /opt/firebird
database hostname? [(blank for local socket if possible)] localhost
database name? [libdbitest] test.fdb
Driver information:
-------------------
Name: firebird
Filename: /usr/local/lib/dbd/libfirebird.so
Desc: Firebird/Interbase database support
Maintainer: Christian M. Stamgren <cm...@ce...>
URL: http://libdbi-drivers.sourceforge.net
Version: dbd_firebird v0.8.0
Compiled: Sep 18 2005
Use CONNECT or CREATE DATABASE to specify a database
CREATE DATABASE 'localhost:/opt/firebird/test.fdb' user 'testuser' password
'testpassword';
Successfully connected!
Using database engine version 1050247 (numeric) and 1.5.2.47 (string)
Test 1: List databases:
not yet implemented
Test 2: Create database test.fdb using default encoding:
This is a no-op with the sqlite/msql/firebird drivers.
Test 3: Select database:
Ok.
Test 4: Get encoding:
The database encoding appears to be: US-ASCII
Test 5: Create table:
Ok.
Test 6: List tables:
Got result, try to access rows
TEST_DATATYPES
Test 7: Insert row:
Ok.
Regards,
Christian
|