Permission denied error creating firebird embedded database in OSX - macos

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'

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.

Related

MacOS: where to install global application data with r/w access

To where a pkg installer package on MacOS should install global application data ? All users of this specific system as well as the app itself should have read and write access to this data. Atm I install it to /Library/Application Support/"mycompany"/"MyApp" and modify the permissions. Is this a good practise for all MacOS versions ?
Thank you !
EDIT:
Meanwhile I have tested to r/w access files in this directory on Sierra and Mojave. It works like a charm when I set the permissions in my custom library folder recursively with chmod -R 777 (well, less would be enough).
BTW I do this with a batch post installation shell script in the packages app here. It's a great UI based app (instead of using a bunch of command line tools). Building the pkg can be automated by a single command line: /usr/local/bin/packagesbuild /path/to/the/project.pkgproj, so integration into a flawless workflow is easy.
Yes. The only change I'm aware of related to this was in 10.7 when Apple changed the /Library folder to a hidden directory. (unlisted in finder unless specified) The path remains unchanged.
https://developer.apple.com/library/archive/documentation/FileManagement/Conceptual/FileSystemProgrammingGuide/MacOSXDirectories/MacOSXDirectories.html

Mono.framework is missing on my mac ... but it's... there?

Please help me interwebs.
I'm having trouble getting my xamarin app to work. I've done a reinstall of Mac OS X and installed Xamarin using the installer, which adds mono and all the rest of it.
Now when I open up terminal and type which mono i get
/Library/Frameworks/Mono.framework/Versions/Current/Commands/mono
...which is what I expect.
But when I navigate to that place (again in terminal) there's nothing there.
From my root folder I go "cd System/Library/Frameworks " and then hit ls and I get a looooong list of installed frameworks but no Mono.framework.
If I go to Apple > About this Mac > System Report > Frameworks Mono IS listed. I can execute Mono commands on the command line. If I look in paths.d the specified path for mono is /Library/Frameworks/Mono.framework/Versions/Current/Commands/mono but I can't find that location so how is it even a thing?
My linux skills are not great, can anyone please help me understand what's going on here?
I think you are looking in the 'wrong' Library folder. There are a few different Library folders. There is one under the Disk Drive (root) directory, one under the User directory, one under the System directory. I think they are all hidden by default. So you need to set your folder/view options explicitly to show the Library folder since it might be hidden by default. The directory you are looking for is directly under you Disk Drive (root).

Install4j I cannot create a simple symbolic link to the users home directory Applications for mac DMG

Im trying to add a symlink target as "Configure Additional Files in the DMG" in install4j.
I set the Symlink target to "~/Applications" which is the syntax that works fine if doing "ln -s" from the command line.
I set the "Name in DMG" to "Applications".
But it doesnt work, I get some kind of folder that doesnt work.It looks like a symlink because it has an arrow on it but when I click on it I get "the operation cant be completed because the original item for Applications cant be found".
Maybe there is a compiler variable I should use?
All Im trying to achieve is to have the Users Applications folder inthe install so they can simply drag the package into it like for many other application installers.

What file permissions are needed in an XPI?

I recently received the following comment from the reviewer of one of my add-ons at the official Mozilla Add-ons website:
The permissions in your XPI are broken. Most files and directories do not have the expected read and execute permissions, or indeed any permissions at all.
I wasn't aware that file permissions were an issue in XPI files. To my knowledge, none of the files in my XPI need the execute bit set (I only package standard stuff: XUL, JavaScript, CSS, etc). I create my XPI in Windows using the Cygwin zip tool, and since Windows knows nothing about file permissions, they aren't stored as they would be in Linux.
What file permissions are expected for file and directory entries in an XPI? The Extension Packaging page at MDN has the following quote, but no associated details on what they should be:
... you must verify that the file system permissions for the directories and files for the extension are set properly. Otherwise, the Extension Manager may not function properly with the extension or the extension itself may not work properly.
This is typically an issue if you create the extension package on Windows but the extension is used on Linux or OS X later - Windows doesn't have any file permissions to be put into a ZIP archive and unpacking on Linux or OS X sometimes creates bogus file permissions (000 rather than the usual 755 or 644). You could try using a different ZIP packer, e.g. Info-ZIP that doesn't cause such issues for me. Better yet, don't require your extension to be unpacked at all - <em:unpack> is often used but rarely really required.

How to install Java 3D on Mac

I am taking a computer graphics course at my university. I am unable to create 3D graphics using Java since I do not have it properly installed. I downloaded the Java 3D API from Oracle. There is no installer included. Just the raw files j3dcore.jar, j3dutils.jar, and vecmath.jar as well as a few read me files. One of the read me files does contain a link that has instructions for the install. It says I must "Unzip Java 3D 1.5.1 into the "jre" directory of your JDK." Where is my JDK? I found my Java folder System > Library> Java > Extension and moved the files there because I read some other things online. I still get this error message in Eclipse when coding: "Access restriction: the method [whatever] from the type [whatever] is not accessible due to restriction on required library /System/Library/Java/Extensions/j3dutils.jar." But I have this file exactly where it says it should be.
Java 3d version 1.3 is pre-installed in Mac OS X. You shouldn't need to install anything. Perhaps try put things back the way they were?
If you want to upgrade to version Java 3D 1.5, you can download this installer: http://create.ife.no/vr/tools/j3d/java3d_1_5_2-macosx.pkg.zip
Firstly i would make sure that all those files have the correct permissions on them... based on the "Access restriction" error, it seems like the problem might have to do with that. From the looks of it, you have them installed in the right place (thats where mine is installed anyway)
this is what mine looks like:
Open a terminal, navigate to the directory you moved the jars to, and use the command:
chmod +x *.jar
+x is a file permission that allows execution of files as programs; files without this permission set will throw errors if you attempt to execute them. Java is technically a bytecode interpreter and jar files are interpreted rather than run, but it's possible that java checks the file permissions manually before loading classes from jars, in which case it would logically fail with an error similar to that which you're reporting.
If you are using eclipse then you can just download the 3d zip file. Move the jars into your project and right click on them. Select add build path. There should be 3 new jars in the referenced libraries.

Resources