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 10:06 PM

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.

Similar questions

5 replies
Question marked as Top-ranking reply

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.





This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

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.