Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

I lost my Documents folder!

Came in this AM to find power had been lost some time last night. After I booted up, I could not see anything in my Documents folder... I get a message "The folder 'Documents' can't be opened because you don't have permission to see the contents." Permissions seem to be fine:


flamingo:~ jnojr$ ls -lde Documents/

drwx------+ 54 jnojr staff 1836 Jun 24 15:34 Documents/

0: group:admin allow list

1: group:everyone deny list,delete


I also cannot see it in my Time Machine, even for older dates when everything was OK.


I can see the contents with an account with sudo privileges. I verified and repaired permissions. I booted into safe mode and ran an fsck Googling led to several discussions where people were using different UIDs or had otherwise lost privileges, which does not appear to be the case here.

Posted on Jul 1, 2014 10:04 AM

Reply
4 replies

Jul 1, 2014 11:30 AM in response to jnojr

Back up all data.

This procedure will unlock all your user files (not system files) and reset their ownership, permissions, and access controls to the default. If you've intentionally set special values for those attributes on any of your files, they will be reverted. In that case, either stop here, or be prepared to recreate the settings if necessary. Do so only after verifying that those settings didn't cause the problem. If none of this is meaningful to you, you don't need to worry about it, but you do need to follow the instructions below.

Step 1

If you have more than one user, and the one in question is not an administrator, then go to Step 2.

Triple-click anywhere in the following line on this page to select it:

sudo find ~ $TMPDIR.. -exec chflags nouchg,nouappnd {} + -exec chown $UID {} + -exec chmod +rw {} + -exec chmod -N {} + -type d -exec chmod +x {} + 2>&-

Copy the selected text to the Clipboard by pressing the key combination command-C.

Paste into a Terminal window by pressing command-V. I've tested these instructions only with the Safari web browser. If you use another browser, you may have to press the return key after pasting.

You'll be prompted for your login password, which won't be displayed when you type it. Type carefully and then press return. You may get a one-time warning to be careful. If you don’t have a login password, you’ll need to set one before you can run the command. If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator.

The command may take several minutes to run, depending on how many files you have. Wait for a new line ending in a dollar sign ($) to appear, then quit Terminal.

Step 2 (optional)

Take this step only if you have trouble with Step 1, if you prefer not to take it, or if it doesn't solve the problem.

Start up in Recovery mode. When the OS X Utilities screen appears, select

Utilities Terminal

from the menu bar. A Terminal window will open. In that window, type this:

res

Press the tab key. The partial command you typed will automatically be completed to this:

resetpassword

Press return. A Reset Password window will open. You’re not going to reset a password.

Select your startup volume ("Macintosh HD," unless you gave it a different name) if not already selected.

Select your username from the menu labeled Select the user account if not already selected.

Under Reset Home Directory Permissions and ACLs, click the Reset button.

Select

Restart

from the menu bar.

Jul 1, 2014 12:48 PM in response to Linc Davis

Didn't work :-(


There isn't much in that directory, and the permissions looked fine:


flamingo:~ joliver$ ls -l $TMPDIR

total 0

drwxr-xr-x 2 jnojr staff 68 Jul 1 12:43 TemporaryItems

drwx------@ 2 jnojr staff 68 Jul 1 12:43 com.apple.CalendarAgent

drwx------@ 2 jnojr staff 68 Jul 1 12:44 com.apple.DataDetectorsDynamicData

drwx------ 9 jnojr staff 306 Jul 1 12:43 com.apple.IconServices

drwx------@ 2 jnojr staff 68 Jul 1 12:43 com.apple.ShareKitHelper

drwx------@ 2 jnojr staff 68 Jul 1 12:46 com.apple.WebKit.Networking+com.apple.Safari

drwx------@ 2 jnojr staff 68 Jul 1 12:44 com.apple.WebKit.WebContent+com.apple.Safari

drwx------@ 2 jnojr staff 68 Jul 1 12:44 com.apple.iChat

drwx------ 2 jnojr staff 68 Jul 1 12:43 com.apple.mdworker.bundle

drwx------@ 2 jnojr staff 68 Jul 1 12:43 com.apple.soagent

srwxr-xr-x 1 jnojr staff 0 Jul 1 12:43 icssuis501

drwx------ 2 jnojr staff 68 Jul 1 12:45 ssh-0ADiWTgr68zJ


The 'find' came back almost immediately with no changes. I did the reset in Recovery, but still no dice.

Jul 1, 2014 1:50 PM in response to jnojr

Please read this whole message before doing anything.

This procedure is a diagnostic test. It’s unlikely to solve your problem. Don’t be disappointed when you find that nothing has changed after you complete it.

The purpose of the test is to determine whether the problem is caused by third-party software that loads automatically at startup or login, by a peripheral device, by a font conflict, or by corruption of the file system or of certain system caches.

Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards, if applicable. Start up in safe mode and log in to the account with the problem. You must hold down the shift key twice: once when you turn on the computer, and again when you log in.

Note: If FileVault is enabled, or if a firmware password is set, or if the startup volume is a Fusion Drive or a software RAID, you can’t do this. Ask for further instructions.

Safe mode is much slower to start up and run than normal, with limited graphics performance, and some things won’t work at all, including sound output and Wi-Fi on certain models. The next normal startup may also be somewhat slow.

The login screen appears even if you usually login automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin.

Test while in safe mode. Same problem?

After testing, restart as usual (not in safe mode) and verify that you still have the problem. Post the results of the test.

Jul 1, 2014 3:13 PM in response to Linc Davis

Well, I fixed this by logging in as my privileged account, moving Documents to Documents.old, creating a new Documents, then copying over my files. Did a recursive chown, and I'm back in business. My Time Machine backups don't look right, but I really don't care that much... I have my docs back. I probably wouldn't suggest this to anyone who needs their history.

I lost my Documents folder!

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.