E. Naumburg

Q: All my Files and Folders are locked can I unlock them?

Have Maverick 10.5.  Got a duplicate zapper program and noticed that all my files and folders are locked.  Can I undo this?

MacBook Pro (Retina, 13-inch, Late 2013), OS X Mavericks (10.9.2)

Posted on Oct 4, 2014 1:11 PM

Close

Q: All my Files and Folders are locked can I unlock them?

  • All replies
  • Helpful answers

  • by Linc Davis,Apple recommended

    Linc Davis Linc Davis Oct 4, 2014 1:31 PM in response to E. Naumburg
    Level 10 (207,963 points)
    Applications
    Oct 4, 2014 1:31 PM in response to E. Naumburg

    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 nouchg,nouappnd,noschg,nosappnd {} + -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 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. Click Utilities, then Terminal in the icon grid.

    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. 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.

  • by Robert Yanal,

    Robert Yanal Robert Yanal Oct 4, 2014 1:57 PM in response to Linc Davis
    Level 1 (30 points)
    Oct 4, 2014 1:57 PM in response to Linc Davis

    My folder /Users/myname/Movies behaves strangely. I can write to it, but if I try to delete or remove a file it asks me for my password. How can I change this?

     

    Running OS Mavericks on a 17" Macbook Pro.

     

    PS. I recognize "your" photo: It's Kant.

  • by Robert Yanal,

    Robert Yanal Robert Yanal Oct 4, 2014 1:59 PM in response to Robert Yanal
    Level 1 (30 points)
    Oct 4, 2014 1:59 PM in response to Robert Yanal

    I should have mentioned that the Sharing & Permissions for the Movie folder are set to Read & Write for Me and Everyone.

  • by elopez1,

    elopez1 elopez1 Feb 29, 2016 3:16 PM in response to Linc Davis
    Level 1 (12 points)
    Mac OS X
    Feb 29, 2016 3:16 PM in response to Linc Davis

    Hey Linc! Thanks for your help. This worked for the hard drive where OS X is installed, but I have two internal hard drives.  How can I do the same for the other hard drive?

  • by Eric Root,

    Eric Root Eric Root Mar 1, 2016 8:34 AM in response to elopez1
    Level 9 (71,175 points)
    iTunes
    Mar 1, 2016 8:34 AM in response to elopez1

    Try going a Get Info (command - I) on the drive and see if there is a box to ignore ownership you can check. If not, give yourself read/write permissions and then click the gear at the bottom to select Apply to enclosed items.

  • by elopez1,

    elopez1 elopez1 Mar 1, 2016 9:57 AM in response to Eric Root
    Level 1 (12 points)
    Mac OS X
    Mar 1, 2016 9:57 AM in response to Eric Root

    Thanks Eric! Both methods helped me get ownership of my files, but to unlock all files at once I ran this command in the terminal:

    sudo chflags -R nouchg,nouappnd folder
    

    Note: replace "folder" with your folder name.

    Source