5

After upgrading to Catalina from High Sierra, I can not longer do simple things in my home direction (e.g., ls, etc.) under XQuartz, getting an error: Operation not permitted.

I recognize that this is due to the new access controls introduced in the previous version. There are many articles available online describing how to fix this for Terminal, by adding Full Disk access under the Security section of System Preferences. However, although it seems like an obvious variation, I don't see anything about making this work for XQuartz. And in fact, giving XQuartz and Xterm full disk access doesn't seem to solve the problem.

Has anyone understood what is going on here?

kaylimekay
  • 161
  • 1
  • 6
  • we would need to see an example! – Richard Barber Feb 17 '20 at 11:47
  • 1
    Have you tried adding Full Disk Access for `/bin/bash` and `/bin/zsh` in the Privacy tab of Security & Privacy? That worked for me under XQuartz. – dmr195 Mar 02 '20 at 15:29
  • 1
    @dmr195 This is the correct solution. Thank you. What's strange is that under Terminal or iTerm, simply adding the terminal app to the whitelist automatically allows the shells it opens to inherit those permissions. But with XQuartz that doesn't work. I wonder why. – kaylimekay Mar 03 '20 at 22:06

3 Answers3

2

Adding full disk access for bash will not work.

The solution is to open the Terminal app and type xterm in Terminal to open up the XQuartz, then you will have full disk access with XQuartz.

Yu Tao
  • 758
  • 5
  • 9
1

The solution, as pointed out by @dmr195 in the comments, is to add /bin/bash (or whatever shell) to the Full Disk Access list under the Security area of System Preferences.

The selector window that opens when you click the + button in that window does not allow you to navigate to /bin. However, by going there in a regular Finder window, you can drag and drop bash into the Full Disk Access list.

kaylimekay
  • 161
  • 1
  • 6
  • 1
    Note that `Command-Shift-G` can be typed in any finder window (including the one you get when you press the + button) to go to any file location. – esmit Nov 21 '20 at 08:39
  • 2
    Does not work for me. This has dogged me for months, still no solution. I have added xterm, zsh, /opt/X11/bin/XQuartz, you name it I have added it to Files and Folders and Full Disk Access yet every time I try to 'ls -l' I just get Operation not permitted in all but my home folder. – Emacs The Viking Mar 12 '21 at 15:18
1

I was unable to get Finder to see /bin in order to drag it to the Full Disk Access (FDA) list. Solution was to create dynamic link to /bin directory from my Desktop, which finder could see.

Also helpful was using Mac's Hypterm to launch an xterm with full permissions, for example to create above link. Launch Hypterm, then update the locate database (the command is: updatedb). This will prompt you to give FDA to Hyperterm for every directory that /bin/bash also cannot see. After that, run xterm and voila, FDA.

C. Cosse
  • 51
  • 4