I just downloaded the iAntivirus app from the Mac App Store. I wanted it to scan my whole hard drive for viruses, so it presented me with an Open dialog box pointing at the root of the hard drive (so that the computer can get access outside of its sandbox). I clicked ok, and the app started.

What I found odd was that I was never presented with a login box. The program was given access to files in the System folder, Library folder, etc. that only I could edit by typing in an admin username and password. Is this a security issue with sandboxing or is that the way it's supposed to work?

2 Answers 2


The App can have read/write access to a location if it gets your permission using an entitlement as part of the App Sandbox, in other words this is how its suppose to work. The App is code-signed and trusted, its asking your permission, in theory all should be good.

As noted in the Mac Technology overview:

App Sandbox

Introduced in OS X v10.7, App Sandbox provides a last line of defense against stolen, corrupted, or deleted user data if malicious code exploits your app. App Sandbox also minimizes the damage from coding errors. Its strategy is twofold:

App Sandbox enables you to describe how your app interacts with the system. The system then grants your app only the access it needs to get its job done, and no more.

App Sandbox allows the user to transparently grant your app additional access by using Open and Save dialogs, drag and drop, and other familiar user interactions.

Specifically a developer can implement the following entitlement as noted here in Enabling App Sandbox, this is exactly what you described in your question, so this is probably the entitlement that the A/V program developer had utilized to obtain just read and write access.


Read/write access to files the user has selected using an Open or Save dialog

Note that this is not the same as true administrator user, since the program would not be granted the execute privilege.

  • Wow, I understand why it works but it's still a little surprising. According to what you said, I could give an app access to another user's desktop folder (or any other folder I don't have permission to access) as long as I open up one of its parent folders in an Open dialog. It kind of defeats the purpose of permissions unless I'm not seeing it correctly. Sep 2, 2012 at 1:37
  • @Jack This answer is not entirely correct. Geowar has provided an answer below which is a more accurate recount of what's happening—the app uses the user's permissions, which may include read/write, but if they do not have permission, the NSOpen dialog doesn't grant it.
    – grg
    Jul 4, 2014 at 16:21

You're not seeing it correctly. Sandboxing doesn't bypass file permissions. If you don't have write access to a file then having the file-write entitlement won't give you write access to the file. Likewise the NSOpen/NSSave dialogs can't access anything they can't access with sandboxing off.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .