CLI unable to access files on external disk

Apple sandbox privacy now applies to the terminal app as well as specific binaries in some cases.

As a developer, you can script for this.

Even Apple tools need to be granted access and you have to approve it with a click.

  • https://support.apple.com/en-us/HT210595
  • https://support.apple.com/guide/security/controlling-app-access-to-files-secddd1d86a6/web

Until you grant permission to look at the disk, the permissions will show incorrectly.