Subject | Re: [firebird-support] Firebird 1.5.3 can't create new database on Linux |
---|---|
Author | Helen Borrie |
Post date | 2006-02-15T22:59:16Z |
At 02:46 AM 16/02/2006, you wrote:
1. Superserver doesn't support direct connection to
databases. CREATE DATABASE doesn't simply create a file, it has to
connect to the database and create objects. Use the full server path
in the filespec argument.
2. Because it's a remote connection, you also have to supply a valid
username and password to the CREATE DATABASE statement (or be logged
in to isql as a valid Firebird user). Being logged in to isql as
root does not make you a user that the database engine can store as Owner.
3. On the Linux permissions side, it is not enough for the firebird
user to be made the Owner of a directory that it didn't create. It
also requires rwx privileges to that directory.
4. Don't be sloppy about file paths. Use the full file path and
don't attempt to rely on relative path addressing.
5. Adhere to the proper symbols for strings in SQL statements,
including DDL. The string delimiter in SQL is single quotes. Note
that there is (currently) allowance made for the y-valve to deal with
double quotes around the database filespec, as they are still needed
in filesystems that support spaces in file paths. But I recommend
not going there.
6. And don't forget that file paths and names are case-sensitive on
Linux. Go to the directory afterwards and check what the actual
filename is. (This is more of an issue with some admin tools, that
convert file names or suffixes to upper case. I don't recall ever
seeing isql do it.)
SQL>create database 'localhost:/opt/aguila/test1.fdb'
CON>user 'DBQ' password 'abcdefghi' ;
./heLen
>Hi there,Several.
>
>Why am not being able to create a new database here?
>
>[root@linux aguila]# /opt/firebird/bin/isql
>
>Use CONNECT or CREATE DATABASE to specify a database
>SQL> create database "test1.fdb";
>Statement failed, SQLCODE = -902
>
>I/O error for file "/opt/aguila/test1.fdb"
>-Error while trying to create file
>-Permission denied
>SQL>
>
>The "/opt/aguila" directory is owned by the firebird user, and I am
>logged in as root. The problem persists even if I change the ownership
>of the directory to root. And there is plenty of free disk space on
>the partition.
>
>I am using Firebird 1.5.3 SuperServer under Mandrake Linux Release 9.1
>
>Any clues?
1. Superserver doesn't support direct connection to
databases. CREATE DATABASE doesn't simply create a file, it has to
connect to the database and create objects. Use the full server path
in the filespec argument.
2. Because it's a remote connection, you also have to supply a valid
username and password to the CREATE DATABASE statement (or be logged
in to isql as a valid Firebird user). Being logged in to isql as
root does not make you a user that the database engine can store as Owner.
3. On the Linux permissions side, it is not enough for the firebird
user to be made the Owner of a directory that it didn't create. It
also requires rwx privileges to that directory.
4. Don't be sloppy about file paths. Use the full file path and
don't attempt to rely on relative path addressing.
5. Adhere to the proper symbols for strings in SQL statements,
including DDL. The string delimiter in SQL is single quotes. Note
that there is (currently) allowance made for the y-valve to deal with
double quotes around the database filespec, as they are still needed
in filesystems that support spaces in file paths. But I recommend
not going there.
6. And don't forget that file paths and names are case-sensitive on
Linux. Go to the directory afterwards and check what the actual
filename is. (This is more of an issue with some admin tools, that
convert file names or suffixes to upper case. I don't recall ever
seeing isql do it.)
SQL>create database 'localhost:/opt/aguila/test1.fdb'
CON>user 'DBQ' password 'abcdefghi' ;
./heLen