Subject Re: [SOLVED][firebird-support] linux, firebird embedded and $FIREBIRD_TMP
Author Vlad Khorsun
Original Message -----
From: "Daniel Weuthen" <daniel.weuthen-ml@...>
Newsgroups: egroups.ib-support
To: <>; <>
Sent: Wednesday, September 30, 2009 10:37 AM
Subject: [SOLVED][firebird-support] linux, firebird embedded and $FIREBIRD_TMP

>>>I want to use Firebird embedded for my Linux application. I copied all
>>> necessary files to an fbembed subfolder. it works pretty well as
>>> long as only one user runs the program. the second user can not use
>>> it because the permissions of /tmp/firebird are wrong for him.
>> AFAIU, what Alex told me, on Posix installer creates user "firebird"
>> and group "firebird". User "firebird" own any objects which is created
>> and used by Firebird (/tmp/firebird folder, memory mapped files,
>> databases, etc). To work with Firebird embedded, users must be member
>> of group "firebird".
>> You can ask for more exact explanations in fb-devel.
>>> I tried exporting
>>> the FIREBIRD_TMP environment variable (pointing to $HOME/appname/fbtmp)
>>> before starting the program, but that seems to be ignored (strace tells
>>> me so). I am using Firebird 2.5 beta 2.
>> Lock table and few other files are placed in /tmp/firebird only, it not depends
>> on any environment variable.
> Sorry Vlad, you must be wrong on that.

No variable existance ? Probably. But you should understand what this variable
means and how to use it properly. See below.

> A college had a closer look at
> the FB source code and found out, that the following environment
> variables are used:
> FIREBIRD_TMP = temporary directory
> FIREBIRD_LOCK = location for lockfiles
> FIREBIRD_MSG = location of firebird.msg file
> and of course there is the FIREBIRD variable itself.
> Setting the FIREBIRD_LOCK variable to "$HOME/appname/fbtmp" solves my
> problem. No /tmp/firebird is created anymore, but $HOME/appname/fbtmp
> instead.

And it will be different for every user, correct ?

If different instances of the engine will use different lock tables (because of
different values of FIREBIRD_LOCK variable) to acces to the same database
you'll corrupt data.

> BTW: I found the following topic in the devel list "lock files
> location". Here is a link to the archive:
> I think if FB is dropping support (e.g. deprecating the FIREBIRD_LOCK
> variable) to act as a real embedded database like sqlite we will have to
> move over to sqlite in the future.

You are free to use any software you like.