File Permissions Denied

I don't have permission to open my Documents folder. When I ask for Info on the folder, it says, You Have Custom Access. When I tried to fix the permissions by making myself the Owner with Read & Write capabilities, I became locked out with no means to the permissions lock.


Would anyone have an idea on how to get to my documents and regain my administrator status?

iMac (21.5-inch Mid 2011), OS X El Capitan (10.11.2)

Posted on Jun 6, 2016 9:07 AM

Reply
30 replies

Jun 6, 2016 10:58 AM in response to skipperbud

Please back up all data before proceeding.

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 -h nosappnd,noschg,nosunlnk,nouappnd,nouchg {} + -exec chown -h $UID {} + -exec chmod +rw {} + -exec chmod -h -N {} + -type d -exec chmod -h +x {} + 2>&-

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

Launch the built-in Terminal application in any one of the following ways:

☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)

☞ In the Finder, select Go Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.

☞ Open LaunchPad and start typing the name.

Paste into the 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. You may be prompted to select a language, then the OS X Utilities screen will appear.

If you use FileVault 2, select Disk Utility, then select the icon of the FileVault startup volume ("Macintosh HD," unless you gave it a different name.) It will be nested below another drive icon. Select Unlock from the File menu and enter your login password when prompted. Then quit Disk Utility to be returned to the main screen.

Select

Utilities Terminal

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

resetp

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.

Jun 10, 2016 3:50 AM in response to Linc Davis

Thank you so much for saving me a return trip to the "genius" bar. I went a week ago because NONE of my applications were responding. My problem was diagnosed as "corrupted software". So my hard drive was erased and new software was installed. I am only sharing this information with you because it was after that process was completed that upon returning home, all documents I had created were locked.

For what it's worth, I thought you might appreciate some feedback about your instructions. At first, I found your instructions confusing, probably because you gave 3 ways to open the terminal app., which I suspect most users have never opened, let alone used. It might help if you inserted "or" after the first 2 options. The option that confused me the most was " Open LaunchPad and start typing the name." My reaction was "What name?" Also, my launchpad opens to a screen of icons, so there is no place to start typing anything.


The part I found most helpful was knowing that there would be no indication that I had typed the password AND that when adollar sign($)appeared, that the process had completed and that I should quit the Terminal.


Needless to say, I was overjoyed when it worked!!! People like me are eternally grateful there are people out there like you who are willing to share your knowledge with us!

Jun 13, 2016 9:47 AM in response to Linc Davis

Linc -

I was able to write your complete command in Terminal, entered my password, and ended with a new line ending with ($). Going to my Home Folder, I was still w/o authorization. My Folder info indicates the Name: "fetching" and the Privilege: "custom access". Some Folders only say You have Custom Access w/o Name and Privilege.

Thanks for providing a solution. I must have something else needing attention.

If there's any chance you would have an idea what might be worth trying, I'd appreciate it.

- Skipperbud

Jun 19, 2016 7:16 PM in response to Linc Davis

HI Linc -


The Apple Genius Bar did identify me as the original owner of the iMac and were successful at unlocking the EFI. As I set-up at home, I realized the did not resolve the File Permissions situation. I then was able to follow your "Step 2" through the part, " Select Unlock File". In the "resetpassword" terminal command, no user accounts were available to select from and reset ACL.


For assurance I had followed your suggestions correctly, I reapplied "Step 1 & 2" again. I was stopped the same as is listed in my first attempt, above.


I hope you might have another approach for me to gain permission to my home folder.


Thank you for your considerations to help me,

Jun 20, 2016 7:07 PM in response to skipperbud

Please enter this command as before:

ls -@BOaen | pbcopy

The output of the command will be automatically copied to the Clipboard. If the command produced no output, the Clipboard will be empty. Paste into a reply to this message.

The Terminal window doesn't show the output. Please don't copy anything from there.

If any personal information appears in the output, anonymize before posting, but don’t remove the context.

Jun 21, 2016 12:31 PM in response to Linc Davis

HI Linc - Here's, I hope, what you were looking to find:


total 32

drwxr-xr-x 14 501 0 - 476 Jun 20 11:10 .

drwxr-xr-x 4 0 80 - 136 Jun 20 15:58 ..

-rwxr--r-x@ 1 501 20 - 10244 Jun 20 11:10 . DS_Store com.apple.FinderInfo 32

drwxr-xr-x 272 501 20 - 9248 Jun 20 16:09 . Trash

-rwxr--r-x 1 501 0 - 930 Jun 17 13:00 . bash_history

drwxr-xr-x 14 501 20 - 476 Mar 12 15:44 . bash_sessions

drwxr--r-x 17 501 20 - 578 Jun 20 12:20 Desktop

drwxr-xr-x 17 1363489488 32767 - 578 Jun 20 16:13 Documents

drwxr-xr-x 3 501 20 - 102 Jun 10 12:15 Downloads

drwxr-xr-x@ 52 501 1 hidden 1768 Jun 11 16:39 Library com.apple.FinderInfo 32

drwxr--r-x 3 501 20 - 102 May 31 12:16 Movies

drwxr--r-x 5 501 20 - 170 May 31 12:16 Music

drwxr-xr-x 6 501 20 - 204 Feb 23 13:01 Pictures

drwxr-xr-x 3 501 20 - 102 Feb 24 20:13 Public


Thanks, again

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

File Permissions Denied

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