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.

`system.log` usually 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.)"

The dialogs always go away after I quit and reopen TextEdit. I also have to delete the backup files manually.

I've tried deleting `~/Library/Containers/com.apple.TextEdit/` and repairing permissions after starting up from the recovery partition. TextEdit's code signature is valid.

There's a [fork of TextEdit](https://github.com/jjgod/TextEditPlus) that isn't sandboxed, but the latest version is based on the version that came with Lion.

Has anyone else run into this issue or know what's going on?