10 Replies Latest reply: Nov 11, 2013 8:11 PM by bluetortilla Branched to a new discussion.
iamsudo Level 1 Level 1 (0 points)

I tried to reset Home Folder permissions and ACLs on a system running Lion that went through successive migrations since Tiger, but apparently failed using Reset Password app from the Recovery Partition. The app starts the operation and keeps running but never ends or shows a message. I think logging is disabled on this partition, so I cannot get more specific information regarding this problem.

 

How can I execute the same reset from Terminal? Can anyone point me to documentation from Apple?


MacBook Pro, Mac OS X (10.7.3)
  • 1. Re: Reset Home Folder permissions and ACLs
    Linc Davis Level 10 Level 10 (118,425 points)

    Some of your files may be locked.

     

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

     

    If you’re running Mac OS X 10.7 or later, open LaunchPad. Click Utilities, then Terminal in the page that opens.

     

    Drag or copy — do not type — the following line into the Terminal window, then press return:

     

    chflags -R nouchg,nouappnd ~

     

    The command may take a noticeable amount of time to run. Wait for a new line ending in a dollar sign (“$”) to appear. Then try again to reset permissions.

  • 2. Re: Reset Home Folder permissions and ACLs
    1800jack Level 1 Level 1 (0 points)

    To reset home folder permissions through terminal with Recovery HD or a boot disk open terminal and type:

     

    cd "/Volumes/Mac OS X Base System/Applications/Utilities/Reset Password.app/Contents/MacOS"

     

    Then hit return

     

    ./"Reset Password"

     

    Then hit return

     

    This worked for me under Lion both with Recovery HD and boot disk.  With this you will get some feedback from terminal about what's going on. Remember exiting terminal will quit Reset Password. However you can launch a second terminal window.

     

    I don't know if launching Reset Password in this manner is a good idea or not it's just an answer on how to do it. Maybe some one with savvy could say whether or not running Reset Password like this prevents from running properly.

  • 3. Re: Reset Home Folder permissions and ACLs
    1800jack Level 1 Level 1 (0 points)

    I got the following feedback from terminal on Reseting home folder permissions with Reset Password.app:

     

    Could not check in for terminal pokes

     

    Repair Home Directory permissions started

     

    Some User permissions have been reset

     

    Repair Home Directory permissions complete

     

    Repair Home Directory Permissions error : Permissions reset on home directory failed.

     

    Anyone have any idea how to find out which permissions are causing trouble? I previously unlocked all files, stripped all ACLs and set rwx for owner and group staff for all files and folders within home folder apart from Library.

     

    When reseting permissions for user root (maybe not a good idea) I got the following output from terminal:

     

    Could not check in for terminal pokes

     

    Repair Home Directory permissions started

     

    Repair Home Directory permissions complete

     

    So it is possible to reset permissions without getting an error!

  • 4. Re: Reset Home Folder permissions and ACLs
    iamsudo Level 1 Level 1 (0 points)

    I think it's advisable to know which files you're changing flags of.

    Instead of just running

     

    chflags -R nouchg,nouappnd ~

     

    I ran

     

    sudo find ~ -flags uchg > ~/Desktop/uchg_files.txt

    sudo find ~ -flags uappnd > ~/Desktop/uappnd_files.txt

     

    I inspected both lists of files and then decided which of them should be flagged again after performing the reset.

    However, you pointed me in the right direction of what to look for. Thanks Linc.

  • 5. Re: Reset Home Folder permissions and ACLs
    iamsudo Level 1 Level 1 (0 points)

    1800jack, I'd be careful to run Reset Password.app the way you did.

    Per instructions of Apple Support you should open Terminal.app in Recovery Partition and run resetpassword. This opens the GUI app in which you select volume, user and click the Reset button.

    For lack of a man page or any other documentation from Apple you're running a binary that serves, as its name implies, not only to reset user folder permissions and ACLs.

  • 6. Re: Reset Home Folder permissions and ACLs
    iamsudo Level 1 Level 1 (0 points)

    Beware that executing this kind of reset causes the backup of the entire user folder by Time Machine.

    I briefly tell my case. I called Apple Support and a "technician" adviced me to run this operation for a pending iTunes in the Cloud related issue. He told me at the phone to run it a couple of times, all of them failed. After I hung up I run it once again. Next I noticed Time Machine backing up +60GB. So I posted the problem in this support forum. Only after checking for uchg and uappnd flags it succeded but causing Time Machine to backup the entire home folder of +160GB.

    I was not warned by Apple Support of this consequence, which is 1 year worth of backups lost due to Time Machine automatically deleting older backups to save the entire user folder over and over again. That's how knowledgeable Apple Support is.

  • 7. Re: Reset Home Folder permissions and ACLs
    Rob Mitchell1 Level 1 Level 1 (0 points)

    Agreed. While I'm hoping that resetting the home folder permissions and ACLs has fixed some issues I've been having, I was stunned to see Time Machine needing to backup 850GB of data. I had tons of room on my TM volume, but suddenly now I either need to dump my older backups (not a great solution), or to be very data-safe, run out and buy another TM volume. Apple really should give clear notice of this consequence!

     

    Or if anyone has workaround ideas for TM, I'm all ears.

  • 8. Re: Reset Home Folder permissions and ACLs
    bluetortilla Level 1 Level 1 (25 points)

    I did exactly as iamsudo did and brought up the GUI version of resetpassword.app with Terminal. I didn't reset the password, merely clicked the reset permissions and ACL's part. Maybe that's important that I didn't, as now everything is running smoothly again (and believe me thing were way out of hand before the reset) and Time Machine is running normally as well (no backup from scratch of my home folder).

     

    I know very little about permissions save that they're a nightmare to a normal end user like me nor do I know much about networking. I do know that when permissions fell out, so did all my networking. I'd guess you can't reset the permissions back to default on a volume you're booted on, so naturally you cannot do it from Disk Utility as is the case with some Volume tasks. But from Recover HD it was a cinch.

  • 9. Re: Reset Home Folder permissions and ACLs
    iamsudo Level 1 Level 1 (0 points)

    After that event this was tested over at http://pondini.org/OSX/Password.html

     

    If you're using Time Machine, any items where the permissions are actually changed will be backed-up on the next backup.  That could result in a large backup.

     

    So YMWV I guess.

  • 10. Re: Reset Home Folder permissions and ACLs
    bluetortilla Level 1 Level 1 (25 points)

    Yes, unfortunately (well, not bad in my case) that's right and I was wrong. Sometime in the middle of the night Time Machine kicked in (though I usually have it turned off) and I woke up to find that my backup disk was full and my last available backup is now from July, 2013. As I don't have much crucial data, it's no problem for me, but now I do have a full disk which will continue to delete old backups.

     

    Unless I buy an even bigger one!  There is no end to backup...  D: