I have been using the following command to copy between a linux machine and a mac and it works fine:

scp -r /home/ubuntu/Desktop/somefolder username@ipaddress:/Users/username/Documents/somefolder

But now I would like to copy over to an external drive on the mac and have tried the following:

scp -r /home/ubuntu/Desktop/somefolder username@ipaddress:/Volumes/MyDrive/somefolder

But it gives me Operation not permitted. I have macOS Big Sur and this must have something with permissions. When I created the somefolder folder on the external drive I was asked to approve it with a password.

Any idea how to get around this?

Btw the reason I am doing this and not connecting the external drive directly to the Linux machine, is that it has no working usb ports to connect an external drive to it.

Edit: I changed the permissions on the external drive to read write for my user and also did the same for the Volumes folder. Now my user on the mac can create a folder without giving a password. But still no luck with the scp command.


This fixed the problem: Had to go to System Preferences on the mac and select: Security & Privacy -> Privacy -> Full Disk Access and tick the box in front of:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.