Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Permission denied error creating firebird embedded database in OSX

Tags:

macos

firebird

Firstly I am not 100% sure I am using the embedded firebird client under OSX. The install file that I downloaded from firebirdsql.org states that it contains Classic, Superclassic & Embedded. Unlike the windows version there does not appear to be a dedicated embedded library file in the package. I have assumed that the libfbclient.dylib (renamed libgds.dylib for my use) can be used as embedded. If I am wrong then I guess thats the problem. Can someone tell me where I get the embedded dylib file?

If libfbclient.dylib is for embedded use also then my question remains. When I try to create the database file for the first time it fails with "Permission denied". I am trying to create this file in the users documents folder. I am using the Interbase Express components in Delphi to connect. This has served me well for years under the windows environment.

The full error message is...
Exception class EIBInterBaseError with message 'I/O error during "open O_CREAT" operation for file '/Users/martin/Documents/LightFactoryShows/default.fdb" Error while trying to create file Permission denied'

like image 991
Martin Avatar asked Apr 04 '13 02:04

Martin


1 Answers

Solved! After re-reading this document several times I finally got it: http://www.ibphoenix.com/resources/documents/how_to/doc_103

The embedded library under OSX is the same as what would be called the exe in windows. In the /Library/Framworks/Firebird.framework folder is an executable just called "Firebird". The key text I did not understand is this "renamed the Firebird file to libfbembed.dylib". My windows experience was tripping me up because in windows you would never rename an .exe to a .dll. I dont know if its possible in windows but I've never herd of it.

There was a couple more trivial things I needed to do so here is the full instructions.

1) Link the "Firebird" {executable} to /usr/local/lib/libgds.dylib

ln -s /Library/Frameworks/Firebird.framework/Firebird /usr/local/lib/libgds.dylib

2) Link the firebird.msg file so that it appears in the /usr/local/lib folder

ln -s /Library/Frameworks/Firebird.framework/Versions/A/Resources/English.lproj/var/firebird.msg /usr/local/lib/firebird.msg

3) Copy the "security2.fdb" to the /usr/local/lib folder and change its permissions to give write access. It does not work to make a link to this file.

cp /Library/Frameworks/Firebird.framework/Versions/A/Resources/English.lproj/var/security2.fdb /usr/local/lib
chmod 777 /usr/local/lib/security2.fdb.
like image 175
Martin Avatar answered Oct 21 '22 04:10

Martin