title: Access external drive over ssh on MacOS
body: <p>I have a new M1 iMac with a 4TB external (USB) drive attached. On the iMac I can access the contents of that drive, named &quot;Data&quot; at <code>/Volumes/Data</code>.</p>
  <p>I use ssh to remotely access this iMac, and would like to be able to access the contents of <code>/Volumes/Data</code>. However, when I try I get &quot;Operation not permitted&quot;.</p>
  <p>I have gone into System Preferences, under Security &amp; Privacy, and added Terminal, iTerm2, and bash (/opt/homebrew/bin/bash) to the list under Full Disk Access. This is mirrored automatically in Files and Folders. I've also added the same items to Developer Tools. All to no avail, I still get the &quot;Operation not permitted&quot; error when trying to do a <code>cd </code> or <code>ls </code> command against <code>/Volumes/Data</code>.</p>
  <p>Some of my search results have suggested turning SIP off. I am reluctant to do this unless absolutely necessary.</p>
  <p>I did try running <code>chflags -R nouchg .</code> in <code>/Volumes/Data</code> while on the iMac, but that also didn't resolve the issue.</p>
  <p>Moving the external drive to a MacBook Pro (I.e., an Intel-based architecture) allows the contents of the external drive to be accessed remotely. The &quot;Operation not permitted&quot; error only happens when the external drive is attached to an M1-based Mac.</p>
  <p>Is there a setting or preference that I've missed that will permit remote access to external hard drives on an M1-based Mac?</p>