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 (): 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.