Subject Re: [Firebird-devel] [SOLVED][firebird-support] linux, firebird embedded and $FIREBIRD_TMP
Author Alexander Peshkoff
> The application itself uses the embedded firebird to create a new
> subdirectory in the users home directory which contains a firebird
> database and some more files. So it is always one user accessing the
> database in his own home directory.

Take into an account - firebird was first of all designed to provide
cooperative access to data.

> The problem is, that the first time a users runs the app, firebird
> creates a /tmp/firebird folder which is only writeable by the user. So
> the second user gets a permission denied error.
> To get around that, I tried to export the env variable FIREBIRD_TMP with
> $HOME/.appname/fbtmp as value. But that seems to be ignored becaus I
> can see from a strace output that /tmp/firebird still beeing tried to
> open, which obviously fails.

It's not ignored, temp files will be created in $HOME/.appname/fbtmp
instead /tmp. To redirect lock files you should set FIREBIRD_LOCK, as was
already mentioned in previous letters.

> I know that firebird-classic or -superserver makes everything easier.
> But it makes one important thing not easier: shipping our app to Linux
> end users in the desktop market.
> [..]

Possible solutions:
1. Add users of your application to firebird group.
2. If you are absolutely sure that they never share same database files, you
can export FIREBIRD_LOCK to point to provate directory. But don't blame us
for lost database if two such users *will* attach it at the same moment.
3. Also you may create /tmp/firebird with full access for everyone. But this
is unsafe solution - every user with login on such box can corrupt lock
files, which almost always means at least segfault in firebird engine.

You see yourself - best solution is one recommended initially - add users to
group firebird.