5

While using MacOS Catalina (which is suspect is the problem) I recently decided to try emacs, as a recommendation from a friend. I finally get it working and generally figure it out and now when trying to open a project or even trying to ls my Downloads or Documents folder I get an operation not permitted error. I have checked my user (whoami) which the user has permission to run the commands, and I have granted full disk access to all emacs applications I could find, yet to no avail.

UPDATE:
Got it working by running csrutil disable in recovery mode (yes I understand what the effects of this are), however I still have this error: enter image description here Any idea how to resolve this? The only way I can add files to the current project is by using :edit FILENAME however I can edit the files just fine, and can run find . in any folder using the integrated terminal.

Blake Nedved
  • 51
  • 1
  • 3
  • AFAICT this is not an Emacs problem as much as a macos problem. – Stefan Oct 13 '19 at 20:22
  • 1
    It must have something to do with emacs, as I have granted the emacs app full disk access, and made sure that the folders are readable by any user – Blake Nedved Oct 13 '19 at 21:09
  • IIUC Catalina added more constraints and your description makes it sound like Emacs is bumping against some of them. I don't think there's anything you can do within your .emacs to fix that: it has to be fixed from outside (which is what I mean by "it's a macos problem", even if it only affects Emacs). – Stefan Oct 13 '19 at 21:12
  • 1
    I do not have such problems - I have Emacs application added to Privacy tab - Accessibility in Settings->Security & Privacy. Then if you access a folder like Documents, it will show up as checked in Privacy tab -> File and Folders, after you gives it the access right. – Ian Oct 14 '19 at 15:04
  • @Ian your hint doesn't work – Mariusz Nowak Dec 23 '19 at 12:33
  • 4
    I have tried it following the steps from here: https://apple.stackexchange.com/questions/371888/restore-access-to-file-system-for-emacs-on-macos-catalina

    It works for me.

    – Zoe Rowa Dec 27 '19 at 05:14

1 Answers1

3

Try running emacs from a terminal:

$ emacs -nw

If it works this way, it means the permissions restrictions is applied only to Emacs.app and can be solved giving permissions to ruby, as explained here.

It sounds weird, but it works like a charm. It is because the desktop app is launched using ruby.

sgmonda
  • 131
  • 4