FileMaker 7.x or 8.x, Leopard and Instant Web Publishing (IWP)
(Added note 6-Nov-2008: Please check the added notes at the end of the article. Yes, FM 8.x works too, and I’ve also added a way to do the patching much faster)
Recently, I was testing some ideas with various versions of FileMaker, and I found out that Instant Web Publishing with FileMaker 7 Developer on Mac OS X Leopard did not work.
I reinstalled FileMaker 7 Developer, upgraded to 7.0v3, installed the fm_70v3_osx_iwp update from the FileMaker website – and things seemed to work fine.
That is – until I quit and restarted FileMaker
I again got the message that Instant Web Publishing could not be started.
After some fiddling and fumbling, I managed to find the cause, and devise a fix for it – and that’s what is outlined here. The fix also works for FileMaker 8.x.
Caveat: use the information here at your own risk – no guarantees of any kind are given, and if things go wrong, the responsibility is yours!
As far as I can tell, the problem stems from the fact that the FM Web Publishing.app application, which is buried inside the Extensions folder, inside the Web Support folder, has some security issues that conflict with Leopard’s security measures.
If you open the FM Web Publishing.app package folder (right-click or Control-click in the Finder, and select Show Package Contents), you’ll find the following structure:
i.e. buried inside the package folder is a Mac OS X executable called FM Web Publishing. This executable makes use of the four included frameworks FMEngine, FMWrapper, MSLRuntime and OmniORB4 which are also part of the package.
The first time you use IWP in FileMaker, FileMaker will change the owner and permissions on this Mac OS X executable to be owned by the user ‘root’ and with a setuid permission. Check the terminal session screen capture below – note the ‘s’ in the -rwsr-xr-x permissions, and the fact that the owner is ‘root’ – not ‘kris’.
Initially, after you decompress and install the fm_70v3_osx_iwp patch from the FileMaker web site, the owner and permissions are not yet set up like this – it’s only when you run FileMaker after installing the new files that the owner and setuid bit are changed. That’s why FileMaker will ask for your password in order to effect these changes.
The problem has to do with the way the FM Web Publishing executable refers to the frameworks: internally it uses relative paths – and on Mac OS X 10.5.x, a.k.a Leopard, a setuid application is not allowed to use relative paths to refer to external frameworks.
If that were allowed, it would be fairly easy for a malicious program to fool the setuid-enabled program and make it refer to ‘fake’ stand-in frameworks and run malicious code with root permissions.
So, Leopard simply refuses to run this executable, and hence, IWP cannot be enabled on Leopard.
Luckily, it’s fairly easy to work around this issue.
First, I copied the four frameworks to my /Library/Frameworks folder, in amongst some other frameworks that already were residing there (my computer is called ‘picard’ – after Captain Picard of the Starship Enterprise):
Secondly, I used a hex editor (I use the old faithful HexEdit, but any hex editor will do) to patch all relative paths to become absolute paths.
First I opened up FM Web Publishing executable itself and searched for references to the frameworks – which I found around position 00000630 hex:
You see @executable_path/../Frameworks/blahdiblah a few times. These are the things that need to be patched. This string means: starting from the executable’s location, follow the relative path ../Frameworks/blahdiblah
This needs to be replaced by an absolute path /Library/Frameworks/blahdiblah and padded with extra zeroes so that the total length of the block does not change – my patched version looks like this:
As a double-check: look at the line at position 000007F0 – it looks identical in both ‘before’ and ‘after’ screen captures, showing that I did not introduce any ‘byte shifts’ in the file.
That’s not the whole story yet – this patch fixes up the executable, but two of the frameworks themselves also have the same problem.
So now you need to go into /Library/Frameworks/FMEngine.framework/Versions/A and open the FMEngine file and do the following patch around position 00000620 hex. I patched it in the same way – below ‘before’:
and ‘after’:
Finally, the /Library/Frameworks/OmniORB4/Versions/A/OmniORB4 file needs a similar treatment, around 000005E0 hex – first the ‘before’:
and then the ‘after’:
And that’s it! Now, FileMaker 7 Developer on Leopard seems to happily enable IWP!
The FMWrapper and MSLRuntime frameworks also contains relative references, but things seem to work fine without patching these – so I’ve left them unpatched. If things don’t work you first might want to patch up these remaining two frameworks in similar fashion…
I hope that this proves helpful – I love to hear feedback!
Additional notes – Added November 6, 2008
Some more info – I’ve tried it out on FileMaker 8.5 now, and it works fine – there are a few more frameworks to cope with compared to FM 7, so there’s a bit more work involved, but apart from that, the story is the same.
I’ve also come up with a shortcut to make things even easier to patch up.
Instead of storing the frameworks you find inside the FM Web Publishing.app package into /Library/Frameworks, you should first create a new folder called
/Library/Frameworks/FMFramewrk
(exactly like that!) instead, and store the copies of the embedded frameworks extracted from FM Web Publishing.app there.
This folder name is hand-crafted such that the path prefix @executable_path/../Frameworks that you can find embedded all over the code has exactly the same length as the prefix /Library/Frameworks/FMFramewrk so we can use a hex editor and do a simple, blind textual find-and replace and replace the string
@executable_path/../Frameworks
with
/Library/Frameworks/FMFramewrk
This eliminates the need for padding with zeroes, and we can do a blind find/replace on the framework files. It’s a fairly mechanical thing: just work your way through FM Web Publishing file inside FM Web Publishing.app and the all the framework copies in /Library/Frameworks/FMFramewrk, dig into them to find the binary file inside, and do the above find-and-replace operation.
A few more notes:
1. the FM 8.5 frameworks are proper ‘packages’ so you need to use the Finder right-click (or Control-click), then ‘Show Package Contents’ to get ‘into’ them.
In other words, don’t drag the frameworks icons onto your hex editor – you need to dig ‘into’ them first!
2. some people get caught out and cannot seem to patch the FM Web Publishing.app/Contents/Mac OS/FM Web Publishing file.
That is because after you’ve run FileMaker that file becomes owned by root and obtains special permissions.
Short story: change the owner and the permissions on this file before trying to hex-edit it – your account should be owner and the permissions should be 755 (a.k.a rwxr-xr-x).
Long story in case the short story does not mean much to you: the easiest way to fix this is to start a Terminal window (Terminal sits inside your /Applications/Utilities folder)
Then type the three following keystrokes (each shown between < and >)
<c><d><space>
and then switch to the Finder and drag the icon for FM Web Publishing.app into the terminal window. A pathname should be appended to what you’ve already typed.
Continue typing in the Terminal window (the <backspace> is to eliminate a space at the end of the dragged path before continuing typing; the <tab> are for automatic command completion so we don’t have to type full filenames)
<backspace></><C><tab><M><tab><return>
This whole operation should result in a Terminal session with its current directory positioned at the proper directory – on my machine it looks like this:
Now type the following commands (each followed by <tab> and <return>); replace yourusername by your short Mac OS X user name – mine is ‘kris’.
sudo chown yourusername F<tab><return>
…enter your password…
sudo chmod 755 F<tab><return>
That reverts the permissions on this file to ‘normal’ after which you can edit it with your hex editor.
Cheers,
Kris
















November 2nd, 2008 at 4:25 am
I’m impressed that you knew about the security conflict, and figured a way to bypass it. Nice work, Kris!
November 6th, 2008 at 4:11 am
Hi Kris,
Michael from FMForums. Have tried your very detailed fix & stuffed up somewhere as it’s not working. Have left a more detailed response on the FMForums.
November 6th, 2008 at 11:46 pm
Hi Kris,
Have sung your praises back on the FMForums as I have managed to get it to work as per your instructions.
Thank you & congratulations on the detail you go to in your instructions. It is rare & my failure to get this to work was 100% due to my incompetence.
Michael
December 7th, 2008 at 5:58 pm
Thank you so much for this information! We have Filemaker 8.5 Pro Advanced and had this same problem when migrating to a new computer. I followed your updated instructions, copying all of the frameworks and using the lovingly hand-crafted path you made up. It worked perfectly and we really appreciate the help!
The only thing I had a problem with was right-clicking… we don’t have a two button mouse. I looked up “Show package contents” and found that it is under the “gear” dropdown in the Finder.
Thanks again!
John
December 7th, 2008 at 6:26 pm
Ah – right-clicking! Forgot to mention, but right-clicking with a one-button mouse is easy enough: press the Control key, hold it down, and click the mouse button. That’s the same as right-clicking!
Thanks for the comment!
Cheers,
Kris
February 16th, 2009 at 10:22 pm
Brilliant! Thank you for publishing this fix!! Worked like a champ on my Mac Mini serving some files for a non-profit.
January 13th, 2010 at 3:48 pm
I’m late to the party here. Just ran into this problem, followed the instructions very carefullly and had no issues executing them, but no success. I am running version 8.0v3 on Snow Leopard. Has this problem been properly solved somewhere else now or is it still ongoing?
January 13th, 2010 at 4:10 pm
One more detail. When I start up FM after doing this, I am asked to enter my password. I still get the error message with IWP and after first startup, the FM Web Publishing file reverts to root ownership. The second time I start FM with no changes, no password is needed, but of course still no success. I have doubled checked that the file has been fully patched – can’t see anything amiss there. And I patched all the other frameworks as well – there were quite a few. No joy.
January 13th, 2010 at 4:26 pm
And the last clue – here is an error from the console: 1/13/2010 5:03:46 PM [0x0-0x458458].com.filemaker.pro8[11204] omniORB: Unrecoverable error for this endpoint: giop:tcp:10.3.2.43:5003, it will no longer be serviced.
January 13th, 2010 at 5:13 pm
Hi bellboy,
Hmm… This is a pretty old post, and I’ve never tried it out on Snow Leopard; there’s a good chance some things have changed between Leopard and Snow Leopard, so I’m not surprised it does not work. However, I currently have no pressing need to run FM 8.x on Snow Leopard, so I won’t be putting time into this – so I guess you’re on your own at this point in time
Hope you figure it out!
Cheers,
Kris
March 31st, 2010 at 9:15 am
Really late to the party here but your solution really helped me out.
Just wanted to say thanks a bunch for this — cheers!