2

While migrating to Yosemite, I manually copied some ~/Library files and folders from my old system to my new system. Now some of the affected apps show weird behavior. Often they cannot save their preferences. One example is the iTunes error message when I try to backup my iPhone:

itunes could not back up the iphone because the backup could not be saved on the computer

Whenever I check, my user has read & write permissions. Disk Utility Repair permissions unfortunately does not help here.

What are the correct permissions for files and folders in ~/Library and ~/Library/Preferences? And how do I set them?

4

It's possible that the Reset Home Directory Permissions and ACLs option in the resetpassword tool will correct those permissions for you, though I'm unsure how 'deep' into your home directory it will reset.

This blog post gives the steps for Lion, which appear to be the same in Yosemite (Note: that last link details instructions for resetting a password, which is obviously not what you are doing here, which is why I linked to the Lion instructions. However, the same tool is used in each process):

  1. Restart, and before you hear the chime, hold down the Command and R keys.

  2. You’ll be at the Repair Utilities screen. Click the Utilities item in the Menu Bar, then click Terminal.

  3. In the Terminal window, type resetpassword and hit Return.

  4. The password reset utility window launches, but you’re not going to reset the password. Instead, click on icon for your Mac’s hard drive at the top. From the dropdown below it, select the user account where you’re having issues.

  5. At the bottom of the window, you’ll see an area labeled Reset Home Directory Permissions and ACLs. Click the Reset button there.

The reset process takes just a couple of minutes. When it’s done, exit the programs you’ve opened and restart your Mac.

  • Doesn't this just do the same as Disk Utility? It would seem very odd to provide two tools to do the same thing and use different code to do it differently – Mark Jan 28 '15 at 10:25
  • No, it does a different job. It resets the permissions and ACLs on a home directory, which repair permissions does not. I just can't confirm it will fix this exact problem. – D.G. Jan 28 '15 at 10:30
  • 2
    Tools like Onyx & Cocktail will do the same task from a nice comfortable GUI if you're not happy in terminal. – Tetsujin Jan 29 '15 at 12:53
  • @Tetsujin True. Although, those apps might be rather overwhelming with the number of options available compared to typing one word in Terminal to reveal a simpler, nice comfortable GUI for this specific task. – D.G. Jan 29 '15 at 19:26
  • @D.G For sure, just wanted to add as a possibility – Tetsujin Jan 29 '15 at 20:35
0

Try this first:

  1. Open Terminal.app from the /Applications/Utilities/ folder
  2. Paste this:

    diskutil resetUserPermissions / `id -u`##
    
  3. Enter admin password.

See if that helps.

If it does not, what I would recommend is to backup the machine with time machine, create a new admin account. Delete the corrupt user preserving the home folder. Create a new "you" user with a slightly different name (like using your middle initial) and then add your main data back to this home folder - and very carefully cross migrate the contents of the Library folder without messing uy the ~/Library permissions.

  • What will this do? (You could improve your answer by linking to a webpage that explains what it does, and editing your answer to include more details). The "/" makes me concerned that the command will operate on the root director (/), not just the OP's ~/Library directory, but without more information I can't be certain. – John N Feb 14 '17 at 13:12
  • @JohnN: According to the help (just diskutil resetUserPermissions), the / picks the disk. Instead of the $(id -u)## thing (don't know what the ## is for), I just used the username. – SilverWolf Mar 26 '18 at 19:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .