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.

ls : operation not permitted

Hi,


Since upgrading to Catalina 10.15.2, I am unable to do "ls ~/Documents", with an xterm I open through XQuartz :


> /bin/ls ~/Documents

ls: Documents: Operation not permitted


1) The command works with the apple terminal app, but not with the XQuartz xterm.


2) I thought the solution would be :

go to System Preferences -> Security & Privacy -> Privacy tab,

click on Full Disk access, and then add XQuartz.app to the list.

But this does not work, despite rebooting.


Any suggestions ?


Best,

Ben


MacBook Pro 15", macOS 10.15

Posted on Jan 10, 2020 6:15 AM

Reply
Question marked as Top-ranking reply

Posted on Feb 5, 2020 12:04 PM

try this, for me it works:


1) put Terminal.app in Security & Privacy (Full Disk Access)

2) open Terminal.app

3) type xterm inside Terminal.app -> this will lunch XQuartz

4) if now you open xterm from XQuartz you can "ls" everything.


Similar questions

5 replies

Feb 5, 2020 10:06 PM in response to giuliano128

To me, the whole point of using xterm is as a replacement for Terminal.app. So running through Terminal.app defeats the purpose.


I found that a more direct solution was to give "Full Disk Access" to /bin/bash. This is a bit counter-intuitive, since I actually use /bin/tcsh for my shell (yeah, I know, I'm a luddite). I'm not sure whether bash is involved because my tcsh is a descendant of a bash process, or because the ls command is using bash in some way. But it is certainly true that I can toggle whether "ls ~/Documents" works by checking/unchecking bash in the Full Disk Access panel.

Feb 7, 2020 2:31 AM in response to BenKil

Hi,


Both solutions (from giuliano128 and James6M) worked for me.


James6M solution is more clean since it doesn't require two apps to make one work (but I can't seem to change it to be the solution).


For anyone reading, in order to add "/bin/bash" to the Full access list, one needs to navigate to "Macintosh HD", and then click "command", "shift" and " . " simultaneously to see the hidden files.





ls : 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.