Subject Re: [firebird-support] firebird on debian SQLCODE = -902 as normal user
Author Antonio Galicia
On 11/27/07, Andi Voss <andi@...> wrote:

> 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

This error is when the user "andi" try to acceso
/var/lib/firebird/1.5/system/security.fdb file because
/var/lib/firebird is only for firebird gruop members.

See:

------ quote 1 -------------
antoniogc@ibmt21:~$ groups
antoniogc dialout cdrom floppy audio video plugdev

antoniogc@ibmt21:~$ echo 'create database "/tmp/test.fdb";' | isql-fb
Use CONNECT or CREATE DATABASE to specify a database
Statement failed, SQLCODE = -902

operating system directive open failed
-Permission denied

antoniogc@ibmt21:~$ ls /tmp/test.fdb
ls: /tmp/test.fdb: No such file or directory

------ quote 2 -------------
antoniogc@ibmt21:~$ groups
antoniogc dialout cdrom floppy audio video plugdev firebird

antoniogc@ibmt21:~$ echo 'create database "/tmp/test.fdb";' | isql-fb-1.5
Use CONNECT or CREATE DATABASE to specify a database
antoniogc@ibmt21:~$ lock manager: couldn't set uid to superuser

antoniogc@ibmt21:~$ ls -l /tmp/test.fdb
-rw-r--r-- 1 antoniogc antoniogc 598016 2007-11-28 10:49 /tmp/test.fdb


The message "lock manager: couldn't set uid to superuser" is because
the process started by the file
"/usr/lib/firebird/1.5/bin/fb_lock_mgr" try to switch to root user but
it can't:

antoniogc@ibmt21:~$ ll /usr/lib/firebird/1.5/bin/fb_lock_mgr
-rwxr-xr-x 1 root root 167236 2007-07-06 07:55
/usr/lib/firebird/1.5/bin/fb_lock_mgr

If set the SUID for this file the message dissparece.

--
Saludos,
Toño
----
http://agc.com.mx/antoniogc/blog