You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Full Disk Access Granted Still Getting Operation Not Permitted

When I ssh into my Mac Studio from my MacBook Pro, no matter what folder it may be, I am getting Operation Not Permitted. Granted Terminal full disk access and even rebooted for good measure and no dice. As this was the only solution I've come across when searching, I wonder if anyone has any idea what else I can try. I am on Monterey on both Macs.


Mac Studio, macOS 12.3

Posted on Apr 16, 2022 5:07 AM

Reply
Question marked as Top-ranking reply

Posted on Apr 16, 2022 11:34 AM

bernsmic wrote:

1. I really don;t know how to make it any clearer than what I just said.

Open terminal on MacBook Pro (let's call it Voyager)
2. SSH to the Mac Studio (let's call it Hopper)

3. Change the directory to Desktop

Do a directory listing and get the error

But that's just the point - screenshots can explain so much. 😄


I get the problem now. You are trying one of those newly protected "special" places - Desktop, Documents, and Downloads. Normally, when apps attempt to access those folders, you get a pop-up prompt. But when you are dealing with the command line, you don't get that kind of help.


Full Disk Access is the only way to pre-emptively override this setting, but it is a reduction in security. Normally it is best to let apps ask. But even then, they shouldn't really be asking. Long story. It's the kind of thing I forget about because it is poor security. I actually know of only one file that legitimately needs Full Disk Access to read. For literally everything else, there is always a better way to access than using Full Disk Access.


Anyway, giving Terminal Full Disk Access in the traditional way isn't going to help, because Terminal isn't involved at all. I was able to reproduce what you are seeing from a Linux box.


What you want to do is check this box in System Preferences > Sharing:



Sorry for the confusion. Full Disk Access is involved, but not the way you might have thought.

On my old Mac Pro when I did the same thing, running the same OS I had no such problem.

This seems to be a new setting in Monterey. I very rarely ssh into my own machines. I did have a remote machine that I used a lot, but it was running Big Sur. It was handled differently in Big Sur and/or I never noticed it because I never used those folders via ssh.

Also, that site, whose link was removed, is just one of dozens of sites and YouTube videos that gave the same solution.

I don't doubt it. Every single one is wrong. 😄

7 replies
Question marked as Top-ranking reply

Apr 16, 2022 11:34 AM in response to bernsmic

bernsmic wrote:

1. I really don;t know how to make it any clearer than what I just said.

Open terminal on MacBook Pro (let's call it Voyager)
2. SSH to the Mac Studio (let's call it Hopper)

3. Change the directory to Desktop

Do a directory listing and get the error

But that's just the point - screenshots can explain so much. 😄


I get the problem now. You are trying one of those newly protected "special" places - Desktop, Documents, and Downloads. Normally, when apps attempt to access those folders, you get a pop-up prompt. But when you are dealing with the command line, you don't get that kind of help.


Full Disk Access is the only way to pre-emptively override this setting, but it is a reduction in security. Normally it is best to let apps ask. But even then, they shouldn't really be asking. Long story. It's the kind of thing I forget about because it is poor security. I actually know of only one file that legitimately needs Full Disk Access to read. For literally everything else, there is always a better way to access than using Full Disk Access.


Anyway, giving Terminal Full Disk Access in the traditional way isn't going to help, because Terminal isn't involved at all. I was able to reproduce what you are seeing from a Linux box.


What you want to do is check this box in System Preferences > Sharing:



Sorry for the confusion. Full Disk Access is involved, but not the way you might have thought.

On my old Mac Pro when I did the same thing, running the same OS I had no such problem.

This seems to be a new setting in Monterey. I very rarely ssh into my own machines. I did have a remote machine that I used a lot, but it was running Big Sur. It was handled differently in Big Sur and/or I never noticed it because I never used those folders via ssh.

Also, that site, whose link was removed, is just one of dozens of sites and YouTube videos that gave the same solution.

I don't doubt it. Every single one is wrong. 😄

Apr 16, 2022 11:12 AM in response to etresoft

I really don;t know how to make it any clearer than what I just said.


  1. Open terminal on MacBook Pro (let's call it Voyager)
  2. SSH to the Mac Studio (let's call it Hopper)


3. Change the directory to Desktop


Do a directory listing and get the error



On my old Mac Pro when I did the same thing, running the same OS I had no such problem. What I am doing is not rocket science. I'm just perplexed why it doesn't work on the Mac Studio. Also, that site, whose link was removed, is just one of dozens of sites and YouTube videos that gave the same solution.

Apr 16, 2022 11:00 AM in response to bernsmic

Several things here...

1) That web site is just awful. If you have followed any instructions from there, I'm sorry. I have no idea what kind of damage you've done.

2) That first point about "Operation not permitted" must be what led you to that site to begin with. That specific example used on that site is one, very specific issue and has absolutely nothing do with whatever problem you are experiencing.


At this point, I'm not sure what to do. I have no idea what state your computer is in now. I have no idea what kind of suggestions you may have followed. Sometimes I see people on place like Twitter complain about bad advice they see in Apple Support Communities. The truth is the exact opposite. Much of what we do here is try to correct the damage done by people following bad advice posted elsewhere on the internet. Taking that huge caveat into consideration, all I can do is simply assume that no damage has been done and proceed from there.


Can I assume that your Terminal is working correctly on the Mac Studio, not via ssh? If not, full stop. Start over. Totally different problem.


How, specifically, are you connecting to the Mac Studio over ssh. What specific command line are you using? Without that information, nothing I can do. Full stop.


Do you get this error on every directory listing? Such as? Please be specific with specific commands you are running. For example:


ls -al ~

ls -al /

ls -al /tmp

ls -al /System


All these commands should always work.


Things like Full Disk Access and disabling System Integrity Protection are greatly misunderstood. To make it short, you don't need them. There are only a handful of very specific uses where they would become an issue. You haven't said anything that remotely suggests they are necessary.


Note that I haven't even begun to talk about ssh yet. I'm not saying any of this is difficult. I'm saying the opposite. All of it, including ssh, should work fine. I think the most likely explanation is that you've followed poor advice on the internet and completely scrambled it.

Full Disk Access Granted Still Getting Operation Not Permitted

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.