You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Permission denied on some .app files

some .app files seem not to get executed.

If I look into the contents and try to excute it over the terminal, e.g.


./Contents/MacOS/foobar


I get a "Permission denied". I'm logged in with Administator rights anyway.


If I just try to "doubleclick" the .app the standard way, just nothing happens. What am I doing wrong here?

What can I do to execute this scripts ?

iMac, Mac OS X (10.6.8)

Posted on Mar 1, 2012 12:55 PM

Reply
Question marked as Top-ranking reply

Posted on Mar 1, 2012 1:22 PM

Applications (.app) are directories, not files. You cannot execute them from the Terminal by specifying the app directory name, you need to do this:


open /Applications/foobar.app


or


/Applications/foobar.app/Contents/MacOS/foobar


... that said, apps can fail for a number of reasons. If it was a "Classic" app, it simply won't run on OS X 10.6. Sometimes an app won't start if the applications settings/preferences files are messed up (look in ~/Library/Preferences or ~/Library/Application Support). Sometimes they won't run because someone was fiddling with them as Admin, in which case using the Disk Utility "fix permissions" feature may restore the proper permissions on the application so that it runs.


It's hard to diagnose the problem without know more about the app involved and the situation that led up to the problem.


Did you check the console to see if any errors are indicated when you attempt to run the app (/Applications/Utilities/Console.app)?

7 replies
Question marked as Top-ranking reply

Mar 1, 2012 1:22 PM in response to jAndreas

Applications (.app) are directories, not files. You cannot execute them from the Terminal by specifying the app directory name, you need to do this:


open /Applications/foobar.app


or


/Applications/foobar.app/Contents/MacOS/foobar


... that said, apps can fail for a number of reasons. If it was a "Classic" app, it simply won't run on OS X 10.6. Sometimes an app won't start if the applications settings/preferences files are messed up (look in ~/Library/Preferences or ~/Library/Application Support). Sometimes they won't run because someone was fiddling with them as Admin, in which case using the Disk Utility "fix permissions" feature may restore the proper permissions on the application so that it runs.


It's hard to diagnose the problem without know more about the app involved and the situation that led up to the problem.


Did you check the console to see if any errors are indicated when you attempt to run the app (/Applications/Utilities/Console.app)?

Mar 1, 2012 2:49 PM in response to J D McIninch

Most (not all) apps will run when you explicitly execute their code file from terminal as mentionerd above. But you generally don't know that unless it is documented or you just give it a try and see what error results.


In the case of "foobar" I have no idea what the problem might be.


OP: In terminal do the following:


file foobar


where foobar is the code file you were trying to execute. This will indicate what kind of code file it is.


Also


ls foobar


This will show its permissions.


Of course where I say "foobar" you should have the proper pathname to "foobar".


One last thing. Look at the app's Info.plist for a key called LSMinimumSystemVersion. See what the minimum OS version is for that app. Maybe it's a 10.7.x Lion app you are trying to run on 10.6.8 (according to your profile/signature) and it's crashing or just terminating.


Finally, what the heck is "foobar" anyway?

Mar 1, 2012 3:17 PM in response to noondaywitch

Oh, I have a background as software developer, the term "foobar" (not to confused with "FUBAR") is often used in discussions or forums as a kind of a placeholder for anything.


I found the problem by the way. It was just that the executable file had no execution flag at all. A simple chmod 775 did the trick for me. I have no explanation how this can happen (it was directly downloaded from a vendor),. but whatsoever.

Mar 1, 2012 3:27 PM in response to jAndreas

I was going to say until I read your second paragraph how you could have gotten a fully constructed app bundle with it's code file not having the execute flag set. But I had that in mind when I suggested above about doing a ls on the code file (and I realize now I was a little too quick in typing that, it should have been a ls -la).


At any rate, glad it's all ok now. Makes you wonder about that vendor though.😉

Permission denied on some .app files

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.