This is similar to How to Restore File System Access in macOS Catalina but the problem is different. I did not upgrade my operating system, only the app, and none of the solutions there are valid fixes for this question.

I am having a problem with my Emacs.app on Mac OS X 10.15 Catalina. The distribution i am using is from the emacs-app-devel port from MacPorts.

I initially installed Emacs.app on Catalina. Everything worked as expected. When i tried to access privileged locations like ~/Documents, i received an OS popup asking for permission, granted, and was able to use the app normally.

I then upgraded my Emacs.app through macports. After the new install and relaunching, i could no longer access the files using the emacs find-file functionality (default C-x C-f). I can still access everything using File->Open. Opening a file in one of the protected directories like ~/Documents using File -> Open or ns-open-file-using-panel does NOT restore access and allow find-file to proceed. Permissions like "Files and Folders" "Network Volumes" are already granted and i can see them. Full Disk Access is not necessary to allow emacs to access these files in Catalina.

  • Drew: I meant both find-file and using the keybinding. I have updated the question for clarity, thank you. – nate Apr 23 at 19:35

Investigating this problem, i was able to see a Console.app error from process tccd, (i think this is the "Transparency Consent and Control System" daemon). The error was Failed to copy signing info for 95201, responsible for file:///Applications/MacPorts/Emacs.app/Contents/MacOS/Emacs: #-67062: Error Domain=NSOSStatusErrorDomain Code=-67062 "(null)". I do not know if the old install of the app produced by macports was codesigned, but the new one definitely was not (i checked this using codesign -vvv Emacs.app). I do not yet know if there will be any unintended side effects, but ah-hoc codesigning the existing app (identity below is '-') did fix my problem.

I used to following command in the app's parent directory:

sudo codesign --force --deep --sign - ./Emacs.app

The codesign ran sucessfully, and upon relaunch i was prompted by the OS when i tried to access ~/Documents using find-file. I granted access and was able to open files inside.

The prompt for ~/Documents looked like this: Documents Prompt

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.