DADiskMountWithArguments fails with "not permitted" error when a path is specified

This appears to be a fairly recent thing.


Has this been de-featured?

Replies

This is on 10.12.5.

I'm seeing the same behavior. It doesn't occur in 10.12.4, but does in 10.12.5.


This functionality is fairly important to certain kinds of programs - in particular, bulk disk duplication programs.


In FlashCraft I use this functionality to mount volumes within the user's temporary folder, in order to prevent operating system services (such as Spotlight) from accessing the volume while it is being written.


@joconnor, have you filed a bug report?

It appears that the mount command line tool (which is used by DADiskMountWithArguments) no longer has the permissions needed to mount volumes with a custom path.


while the following fails:


$ mount -t udf -o nobrowse /dev/disk2 /tmp

mount_udf: mount_udf: open /dev/disk2 failed, Permission denied: Permission denied


the following succeeds:


$ sudo mount -t udf -o nobrowse /dev/disk2 /tmp


I suspect that DADiskMountWithArguments will have to be called from a privileged helper tool in order to regain this functionality.