Here's the main problem: I just installed Mac OS 10.7 (Lion) and created a new Administrator user account (called "test"). Then I used TextEdit to creat a text file called test.rtf. I dragged test.rtf onto the dock and checked off the "Open at Login" option.

When I log out and log back in, the file does not open at login, but rather, I get a dialog that says: The document "test.rtf" could not be opened. You don't have permission.

ls -la on the terminal outputs the following info for the file:

-rw-r--r--@ 1 test staff Apr 23 11:22 /Users/test/Desktop/test.rtf

I even tried chmod 777 on the file, and it still doesn't open at login. Same error dialog.

I checked system.log and saw this:

sandboxd[361] ([356]): TextEdit(356) deny file-read-data /Users/test/Desktop.rtf

I also tried repairing permissions (while logged in and also while booting up off of the Command+R recovery boot) and that didn't solve the problem either.

Extra background info:

Yesterday, I backed up my Mac OS 10.6 (Snow Leopard) User directory onto an external hard drive. Next, I wiped out the contents of my hard drive and did a fresh install of OS 10.7 (Lion).

When I copied my backed up files and folders back onto my newly installed OS, I had some permission issues. Directories like Movies and Documents weren't readable, so I used chmod to change the permissions appropriately. Then everything seemed fine.

For good measure, I also chowned all of those files using chown -R MyUserName:staff.

Note: The new user account that I created in Lion had the same name as my user account from Snow Leopard before I backed up my files and erased the hard drive.

The problems that I described in the above section with the "test" user account also occurred with my regular user account, but I figured I'd create a fresh account to see if it was just a permissions issue that stemmed from the copying over of my old files.

  • Did you consider using Repair Permissions from the Disk Utility program?
    – user3463
    Apr 23, 2012 at 16:15
  • Yeah, tried that while logged in and also started up off of the Command+R recovery boot and tried it there as well. Thanks for the suggestion though. I'll add that to the description actually.
    – hithere
    Apr 23, 2012 at 16:20
  • "Long story short"? Have you looked at your post once you were done?
    – Daniel Beck
    Apr 23, 2012 at 16:40
  • Daniel, if it makes you feel better, I'll remove those words from the start of my post.
    – hithere
    Apr 23, 2012 at 16:43
  • I absolutely can reproduce the issue and suspect it's related to Apple's beyond-broken application sandbox implementation that limits to what files individual applications get access. I suggest you file a bug at bugreport.apple.com
    – Daniel Beck
    Apr 23, 2012 at 16:45

3 Answers 3


It looks like it's related to the application sandbox implementation in OS X Lion.

I can reproduce it with Preview and TextEdit.

Possible workaround:

  • Assign a non-sandboxed program (e.g. TextMate) to open the document. You can just change the program association for one text file in its Get Info dialog.
  • Don't open the document upon login, but instead e.g. an Automator application that opens the file. You don't need to keep it in the Dock to do this either.

    Automator screenshot

  • Good call with trying out a non-sandboxed app. I opened the text file with Komodo Edit and it worked on login. I also tried opening a PDF on login using Preview, but (as you'd expect) it failed with the same permission error. I hope that a lot of Mac users (and people at Apple) will see this question. I'll still file that bug report though.
    – hithere
    Apr 23, 2012 at 18:03
  • @hithere Once you've done so, please edit your question to include the bug ID, and, if possible, the description you used. It allegedly helps to generate additional awareness if others file bugs referencing yours, that essentially say "I want that other issue fixed".
    – Daniel Beck
    Apr 23, 2012 at 18:34
  • Good thinking. Will do.
    – hithere
    Apr 23, 2012 at 20:10
  • Oh, actually, if this StackOverflow post is still accurate, it looks like other people don't have a way of viewing my bug report: stackoverflow.com/questions/144873/…
    – hithere
    Apr 23, 2012 at 20:13
  • 1
    Here you go! ID: 11301342
    – hithere
    Apr 23, 2012 at 23:43

The workaround I used, having had the same problem, was to have TexTEdit opened at Login and use Lion's ability to remember open documents.

I realize this will break if someone uses TextEdit, but in my case the document is a warning saying the wrong OS of a dual-boot system has been started up, and advising the user to restart using the other partition.


This was driving me crazy after I upgraded to Lion. I have a text file of bills and due dates that I've had auto-open at login for years.

My solution was to use an app called DelayedLauncher that opens the file in TextEdit several seconds after login. Essentially, it is the same solution as having Automator open the file.

I am now running Mountain Lion. I have not tested whether the behavior is the same in 10.8, but I suspect it is.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .