Skip to main content
1 of 5
Lri
  • 106.4k
  • 19
  • 230
  • 283

TextEdit shows dialogs about not having permission to open any files

About once per day, TextEdit starts showing dialogs like this when I try to open any file:

The document “test.txt” could not be opened. You don’t have permission.

To view or change permissions, select the item in the Finder and choose File > Get Info.

They go away after I quit and reopen TextEdit.

system.log always contains messages like this:

9/13/12 10:41:42.952 PM sandboxd[21081]: ([357]) TextEdit(357) deny file-read-data /Users/lauri/Desktop/test.txt
9/13/12 10:41:55.118 PM TextEdit[357]: NSFileVersion tried to tried to add a new generation and failed. Versioned file URL: file://localhost/Users/lauri/Notes/temp.txt, contents URL: file://localhost/Users/lauri/Notes/temp.txt.sb-de6477ff-BhVNrq, error: Error Domain=GSLibraryErrorDomain Code=1 "The operation couldn’t be completed. (GSLibraryErrorDomain error 1.)"
9/13/12 10:41:55.118 PM TextEdit[357]: NSDocument failed to preserve the old version of a document. Here's the error:
Error Domain=GSLibraryErrorDomain Code=1 "The operation couldn’t be completed. (GSLibraryErrorDomain error 1.)"
9/13/12 10:41:55.119 PM TextEdit[357]: <Document: 0x7f971d00a510>: An error occurred while attempting to preserve the backup file at file://localhost/Users/lauri/Notes/temp.txt.sb-de6477ff-BhVNrq: Error Domain=GSLibraryErrorDomain Code=1 "The operation couldn’t be completed. (GSLibraryErrorDomain error 1.)"

I also have to delete the backup files (like temp.txt.sb-de6477ff-BhVNrq) manually later.

I don't know if it's related to Apps occasionally start showing "The document could not be autosaved" dialogs, but that stopped happening for me on Mountain Lion.

I've tried repairing permissions after starting up from the recovery partition. TextEdit's code signature is valid. I haven't seen the dialogs in other applications, but that might be because I don't use other document-based sandboxed applications that much.

Lri
  • 106.4k
  • 19
  • 230
  • 283