hdiutil occasionally causes operation not permitted

Hi,

I have a java application, fully signed and notarized which runs a shell script that calls the following (with admin permissions): hdiutil attach -nobrowse "${INSTALLER_LOCATION}"

This command seems to very occasionally fails for our users with the message:

hdiutil: attach failed - Operation not permitted

I was wondering if there were any entitlements we could add or some way to check/request permission from the script.

Cheers, Tom

Operation not permitted suggests EPERM, which is a very generic error code. Given that this only happens rarely, it’s obviously not an entitlement issue. As to what is causing it, it’s hard to say without more info.

The weapon of choice for debugging problems like this is a sysdiagnose log. I recommend that your tweak your app to look for this error and then gather a sysdiagnose log. Specifically:

  • If your app is deployed in a managed environment, it may be appropriate to gather this log automatically.

  • If your app is deployed to a wide range of users, you should put up an alert asking the user to gather than log and get in touch.

  • Or you could just restrict this to your beta test group.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

hdiutil occasionally causes operation not permitted
 
 
Q