Can't seem to mount a snapshot

I'm running the latest Mojave. I create a snapshot with:


$ tmutil localsnapshot
Created local snapshot with date: 2020-08-04-150521


Then I want to mount it:


$ sudo mkdir /private/tmp/snap
$ sudo mount_apfs -o rdonly,noatime,nobrowse -s com.apple.TimeMachine.2020-08-04-150521 / /private/tmp/snap
mount_apfs: mount: Operation not permitted


I've tried various options, other paths, etc., and can't get it to mount, I always get the Operation not permitted (unless a snapshot of the given name doesn't exist, in which case mount_apfs fails *silently*. Grrrr)


iMac 27″, macOS 10.14

Posted on Aug 4, 2020 3:26 PM

Reply
Question marked as Top-ranking reply

Posted on Sep 1, 2020 11:45 PM

I think brenden dv might have just failed the Turing Test.


Anyway, after scouring Google for the answer to the same problem, I found a post where someone suggested making sure Terminal.app is allowed "Full Disk Access" in the OS Privacy Settings. Sure enough that worked.


Credit given to this page: https://forum.duplicacy.com/t/error-error-vss-create-error-while-mounting-snapshot-exit-status-73/4061


9 replies
Question marked as Top-ranking reply

Sep 1, 2020 11:45 PM in response to blmatthews

I think brenden dv might have just failed the Turing Test.


Anyway, after scouring Google for the answer to the same problem, I found a post where someone suggested making sure Terminal.app is allowed "Full Disk Access" in the OS Privacy Settings. Sure enough that worked.


Credit given to this page: https://forum.duplicacy.com/t/error-error-vss-create-error-while-mounting-snapshot-exit-status-73/4061


Aug 7, 2020 5:58 PM in response to blmatthews

FYI, here is an article on how to mount an APFS snapshot and except for the extra options seems to be what you are doing:

https://derflounder.wordpress.com/2019/02/23/mounting-time-machine-local-snapshots-as-read-only-volumes


Try the command without all those options and try changing the mount point to a folder within your user folder where you know you have the correct permissions. The comments in that article mention some differences with Catalina so perhaps a Mojave update changed the behavior to match Catalina.



Sep 3, 2020 6:53 PM in response to HWTech

Yes, the error message is poor (or nonexistent), but even if in the mount_apfs man page they listed the 5 (or however many) circumstances an Operation not permitted could occur, and one was a lack of Full Disk Access, it would have saved me a lot of time, and saved everyone that was nice enough to respond some time. Unfortunately the manual pages for a lot of Apple-specific command line tools are weak at best.

Aug 8, 2020 10:38 AM in response to HWTech

I think I'd done all the things you suggest when initially trying to get it to work, but I went back and did it all again more systematically:


$ tmutil localsnapshot
Created local snapshot with date: 2020-08-08-101011
$ mkdir ~/snap
$ mount_apfs -s com.apple.TimeMachine.2020-08-08-101011 / ~/snap
mount_apfs: mount: Operation not permitted
$ sudo -s
Password:
# tmutil localsnapshot
Created local snapshot with date: 2020-08-08-101147
# mkdir /tmp/snap
# mount_apfs -s com.apple.TimeMachine.2020-08-08-101147 / /tmp/snap
mount_apfs: mount: Operation not permitted


I've also tried using an existing snapshot created by Time Machine (in case one I create is somehow different), using .local on the end of the snapshot (which results in the silent failure I noted originally, because on Mojave that's not a valid snapshot name), specifying /sbin/mount_apfs (although bash says that's where it is when I just use mount_apfs) and instead of mounting / trying various subdirectories, including my home directory. All (except the silent failure with an invalid snapshot name) result in Operation not permitted from mount.

Sep 2, 2020 10:16 AM in response to blmatthews

Thanks for confirming @benjamindines' suggestion. Good job @benjamindines! I need to remember Full Disk Access.


I agree Apple has some of the most cryptic error messages around. I guess I'm spoiled with Linux where many times the error message will actually have the solution displayed in the message. Sometimes it is the little details.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Can't seem to mount a snapshot

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