3

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.

0

2 Answers 2

5

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:

sshd-keygen-wrapper
5

In MacOS Monterey 12.6 go to settings of System Preferences > Sharing > Remote Login and enable enable the [x] Allow full disk access for remote users.

In my case it has affect on both SSH connection and SFTP.

2
  • And the same was required under macOS 13.3.1
    – msbit
    May 19, 2023 at 7:26
  • It is in System Settings > General > Sharing Remote Login > (i) in macOS 14 (Sonoma). Mar 3 at 19:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .