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

10.10.3 Photos cannot repair permissions

I have a 215G Photo Library (iPhone/Aperture) and the new Photos app cannot work with it. When I try to use it, it gets 3% into preparing it and then reports that "Photos can't repair permissions on" the library.


Things I have tried:


iPhone/Aperture repair permissions (cmd-opt on launch of either app, select from the dialog), repair database, and rebuild database.


I have gone into iTerm and tried


sudo chown -R my_user_name ~/Pictures/my_photo_library

sudo chmod -R 700 ~/Pictures/my_photo_library


That didn't work either.


Then I tried moving the Photo Library out of the Pictures folder to my Desktop and working with it from there (more out of superstition than from any sense that it would actually do anything).


I'm at a loss now as to what to try next. Any suggestions? What I know I can do, but really don't want to, is to go into Aperture and create a Smart Album with all pictures in it and then export that as a new library. But that will take ages and I worry that I will lose albums, events, or metadata in the process (though I don't believe you are supposed to lose any of that).

iMac, OS X Yosemite (10.10.3), 27-inch, late 2012

Posted on Apr 9, 2015 9:26 AM

Reply
6 replies

Apr 9, 2015 12:03 PM in response to aaffleck

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 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. When the OS X Utilities screen appears, 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.

Apr 11, 2015 5:00 PM in response to aaffleck

Hi All, For those of you who prefer a more hands-off approach than the one in the link previous posters have supplied I recommend using the highly reviewed application "iPhoto Library Manager." It solved the permission repair problem for me. I'm not sure it's worth buying the application now that iPhoto is going the way of the Dodo Bird. But if you already own it, let the application rebuilt your iPhoto library. This rebuilt library, for me, went through the migration process to a Photos library with without a hitch.


Here's a short section of the documentation from iPhoto Library Manager that explains why its rebuilding of your iPhoto Library could be successful while using the native rebuilding in iPhoto won't work.


"iPhoto also has a built-in rebuild function that can be sometimes be used to repair a corrupted library database. You can find instructions on how to use that on Apple's website at http://support.apple.com/kb/HT2638 (iPhoto 6 or later).

iPhoto Library Manager's rebuild works differently, in that instead of trying to repair the library in place, it creates a brand new library and tries to reimport the entire contents of the original library into the new one, including reconstructing albums, photo metadata, etc."

So, there you have it. Mr. Luigi

May 18, 2015 4:02 AM in response to Linc Davis

Thanks for this post! After installing a SSD and coping the OS and my Home folder to this drive, I left my Photos folder on the original HD to conserve space on the SSD. The permissions on my old Home folder somehow got hosed and Photos wouldn't update giving me permission errors. After some trial and error I was finally able to boot up using the HD and into my old Home account. I followed your instructions to repair the permissions and everything is working smoothly again.

10.10.3 Photos cannot repair permissions

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