macOS Permissions – Unable to Sudo Past Permissions on MobileSync Directory

backupiosiphonemacbookmacos

If I run this I get Operation not permitted:

ls -al  ~/Library/Application\ Support/MobileSync

This is off limit to safeguard the backup, but it is owned by me, hence I should be able to run this to find out how much storage MobileSync is taking:

sudo du -hs  ~/Library/Application\ Support/MobileSync

But even that fails. Why am I unable to sudo past permissions?

Context

After upgrading to a new MacBook Pro, I see that the iPhone (the iPhone remains the same) has its music collection backed-up.

With the old MacBook Pro my music collection was on the main disk.

On the new MacBook Pro, it's on an external disk, but I still want to sync music from MB to iPhone, and not to back-up the music back on MacBook Pro (which would be silly).

Running sudo will help in getting to the bottom of this.

Best Answer

  • Open System Settings... (from Apple menu; top-left of screen).
  • Click on Privacy & Security from the left pane.
  • Click Full Disk Access under Privacy.
  • Toggle the switch for Terminal.
Related Question