Subject Re: [firebird-support] firebird on debian SQLCODE = -902 as normal user
Author Andi Voss
Helen Borrie wrote:
> Next, what *model* of firebird 1.5 have you installed?

Thats what I already wrote:
mrburns:/var/log# aptitude show firebird2-classic-server
Paket: firebird2-classic-server
Zustand: Installiert
Automatisch installiert: nein

I installed the classic version.

> This error suggests one of two things:
> a) You are running Superserver not Classic. With SS you cannot connect
> directly to a database file as you can with Classic and the
> client.


> or
> b) The firebird group doesn't have execute permissions on the directory
> where the database file is located.

Directory permissions:
mrburns:/var/lib/firebird2# ls -l
drwxrwxrwx 2 firebird firebird 4096 2007-11-26 08:12 data

The database (permissions):
mrburns:/var/lib/firebird2/data# ls -l
-rwxrwxrwx 1 firebird firebird 412581888 2007-11-26 08:20 database.gdb

> Assuming the following:
> 1. You installed the Superserver model of Firebird


> 2. You have renamed isql to isql-fb

it is the standard installation of debian. /usr/lib/firebird2/bin/isql
is linked to /usr/bin/isql-fb

> 3. You are in $firebirdroot$/bin directory
> ~~~$ .isql-fb [return]
> Use CONNECT or CREATE DATABASE to specify a database
> SQL> CONNECT 'localhost:\path\to\database.gdb'
> CON> USER 'ANDI' PASSWORD 'xxxxxxxxxxx';
> SQL>
> Or, you can connect directly from the command-line:
> ~~~$ .isql-fb 'localhost:\path\to\database.gdb' -user ANDI -pass
> xxxxxxxxxxx [return]
> SQL>

I removed everything related to firebird, also all configuration files
and also the modified security.fdb.
Then I reinstalled all firebird2-classic debian packages.
security.fdb contains only SYSDBA.

Now I can connect when I'm logged in as user andi, but only this way:
andi@mrbruns:/usr/lib/firebird2/bin$ isql-fb
SQL> CONNECT '/path/to/database.gdb'
lock manager: couldn't set uid to superuser
Database: '/path/to/database.gdb', User: SYSDBA

When I try this way:
andi@mrburns:/usr/lib/firebird2/bin$ isql-fb
'localhost:/path/to/database.gdb -user SYSDBA -pass masterkey
Statement failed, SQLCODE = -902

operating system directive open failed
-Permission denied

The same error occurs, when I try this as root.

This error I also retrieve when I start my website which is connecting
to firebird.
apache user is www-data.

What problem do I have?
I've no more idea what to do...

> ./heLen