Subject Re: [firebird-support] Permission denied on create database
Author Helen Borrie
At 12:02 PM 17/06/2005, you wrote:
>I just installed FirebirdSS rpm package on Linux and I'm having a heck
>of a time trying to create a database. I'm able to connect to databases
>and modify them, but not create them. Here's what I'm seeing:
>
> [garrett@www garrett]$ isql
> Use CONNECT or CREATE DATABASE to specify a database
> SQL> create database 'foo.fdb' user 'sysdba' password 'foobar';
> Statement failed, SQLCODE = -902
>
> I/O error for file "/home/garrett/foo.fdb"
> -Error while trying to create file
> -Permission denied
>
>I certainly have write access to my home directory. I can run as root
>with the same result.
>
>I'm wondering if the Firebird deamon is trying to create/modify
>something in the background and can't because of file permissions. This
>is just blind speculation.
>
>Has anyone else run into this?

This is a matter of Unix filesystem permissions. In order to create a
database, the Unix user named firebird ("the firebird user") has to create
a file. Therefore, you need to make sure that the firebird user has rwx
filesystem permissions to the directory where the db is being
created. It's recommended to create a firebird group that contains the
firebird user and any other Unix users that might need file-level access to
the database file, and to grant these permissions to the group.

./hb