• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Unmounting/ejecting volumes in sandboxed mode
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Unmounting/ejecting volumes in sandboxed mode


  • Subject: Unmounting/ejecting volumes in sandboxed mode
  • From: Oleg Krupnov <email@hidden>
  • Date: Mon, 12 Aug 2013 18:28:06 +0300

I've run across an unexpected and undocumented problem, and couldn't
google anything on it.

It seems that if an app is sandboxed, it is not permitted to eject
disks or unmount volumes.

I tried -[NSWorkspace unmountAndEjectDeviceAtPath:],
FSUnmountVolumeAsync / FSEjectVolumeAsync, DADiskUnmount / DADiskEject
but all I get is failure with a message like "Error
Domain=NSOSStatusErrorDomain Code=-47 "The operation couldn’t be
completed. (OSStatus error -47.)" (fBsyErr: File is busy (delete))"

and in Console I see "com.apple.SecurityServer[16]: Sandbox denied
authorizing right 'system.volume.internal.unmount' by client …"

The "system.volume.internal.unmount entitlement" is not documented,
and when I tried to add it to the list of entitlements, the app fails
to start at all, saying not enough permissions.

What's going on? Is there a way to eject/unmount disks in sandboxed mode?

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: Unmounting/ejecting volumes in sandboxed mode
      • From: Kyle Sluder <email@hidden>
  • Prev by Date: Re: javaScriptCore threads?
  • Next by Date: Re: Unmounting/ejecting volumes in sandboxed mode
  • Previous by thread: Re: javaScriptCore threads?
  • Next by thread: Re: Unmounting/ejecting volumes in sandboxed mode
  • Index(es):
    • Date
    • Thread