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

Error while repairing permissions

Just upgraded to the new Photos app, during the 'Preparing Library...' phase I received the following error "An error occurred while repairing permissions"


I rebooted to the recovery console (⌘R during a restart) and ran Disk Utility to repair permissions and repair the disk. After rebooting the same error appears after starting photos.


My console log shows the following:


2015-04-08 5:33:49.369 PM Photos[550]: Attempted pid lock for: file:///Users/jj/Pictures/iPhoto%20Library/, <PLPHgPIDFile: 0x61000024e400>, 1, retries: 3

2015-04-08 5:33:49.398 PM Photos[550]: Running permission check before migration

2015-04-08 5:33:49.398 PM Photos[550]: Begin Library Permission Check

2015-04-08 5:33:55.533 PM Photos[550]: End Library Permission Check, error: Error Domain=com.apple.library-repair.error Code=4 "The operation couldn’t be completed. (com.apple.library-repair.error error 4.)"

2015-04-08 5:33:55.533 PM Photos[550]: PLMU migration failed: Error Domain=RKRepairLibraryPermissions Code=3 "The operation couldn’t be completed. (RKRepairLibraryPermissions error 3.)" UserInfo=0x600000270f00 {NSUnderlyingError=0x610000255b70 "The operation couldn’t be completed. (com.apple.library-repair.error error 4.)"}

2015-04-08 5:33:55.541 PM Photos[550]: PLMU migration failed permission check: Error Domain=RKRepairLibraryPermissions Code=3 "The operation couldn’t be completed. (RKRepairLibraryPermissions error 3.)" UserInfo=0x600000270f00 {NSUnderlyingError=0x610000255b70 "The operation couldn’t be completed. (com.apple.library-repair.error error 4.)"}, underlying error: Error Domain=com.apple.library-repair.error Code=4 "The operation couldn’t be completed. (com.apple.library-repair.error error 4.)"


Anyone else see this already, or know how to report an issue directly to Apple?

Posted on Apr 8, 2015 4:46 PM

Reply
20 replies

Apr 8, 2015 6:01 PM in response to Josho the mac

Fixed it. My Photos library is now updating. Here is what worked for me.


The Photos app seems to import every image from your iPhoto library. Over the last 7 years it turns out that a few of my photos became corrupted at the system level (even low level tools fail to read from the file). So, when Photos fails to open a file, it simply reports an error and quits. Not the most robust error handling, but what can you do.


I resolved the problem by watching my system console (Spotlight Console to open the app). Next start Photos, and wait for the Photos app to fail. Look for something like the following in the console:


2015-04-08 6:40:33.000 PM kernel[0]: /SourceCache/AppleFSCompression_kexts/AppleFSCompression-68.1.1/Common/ChunkCom pression.cpp:264: /Users/jj/Pictures/iPhoto Library/Masters/2009/22-09-2009/Lighthouse Heceta.psd: invalid resource map


In my case above the kernel (the operating system) couldn't open one of my images. I deleted the file through Finder (Control-Click on the iPhoto folder using Finder and choose 'Show Contents'). I repeated this process until Photos imported my iPhoto library.


I'll try to restore the lost photos from a backup, but depending on when the corruption occurred to the file, I may have simply been backing up a corrupted file for years.

Apr 8, 2015 6:28 PM in response to Josho the mac

This what my console tells me:

4/8/15 9:16:16.000 PM kernel[0]: /SourceCache/AppleFSCompression_kexts/AppleFSCompression-68.1.1/Common/ChunkCom pression.cpp:264: /Users/AP/Pictures/iPhoto Library/ThumbJPGSegment.data: invalid resource map

4/8/15 9:16:16.667 PM com.apple.library-repair.agent[620]: open() failed (22) on path "/Users/AP/Pictures/iPhoto Library/ThumbJPGSegment.data"

Seems it's getting stuck on the Thumbnail data. Trying a thumbnail rebuild and seeing if that fixes it. It's going to take a while ...

Apr 9, 2015 4:16 AM in response to Josho the mac

Rebuilding thumbnail didn't change anything - was still getting stuck on /Users/AP/Pictures/iPhoto Library/ThumbJPGSegment.data file ... not really sure what the file is even as it's a UNIX executable file. I moved it out of the iPhoto library package and sure enough, Photos now seems to be properly making the changes to my iPhoto Library without a hitch. I'm going to do some research on how the ~220MB file got there and what is, as it says it was created in June of 2012

Apr 9, 2015 8:21 AM in response to Josho the mac

Same problem for me not sure what it's failed on though?


09/04/2015 16:13:47.965 photolibraryd[304]: Failed to open library Photos Library.photoslibrary Error: Error Domain=com.apple.lithium Code=330 "Sandbox access error." UserInfo=0x7ffc50f2d390 {NSLocalizedDescription=Sandbox access error., NSFilePath=/Users/jamesbuckingham/Pictures/Photos Library.photoslibrary/Database/BigBlobs.apdb, LiResolvedPath=/Users/jamesbuckingham/Pictures/iPhoto Library/Database/apdb/BigBlobs.apdb, NSLocalizedFailureReason=Operation 'read' not permitted.}

09/04/2015 16:13:47.965 Photos[1293]: Unable to repair permissions for library '/Users/jamesbuckingham/Pictures/Photos Library.photoslibrary': Error Domain=com.apple.reddwarf Code=39 "RDErrorLibrarySandboxNoPermission" UserInfo=0x60000066a8c0 {NSURL=file:///Users/jamesbuckingham/Pictures/Photos%20Library.photoslibrary/, NSLocalizedDescription=RDErrorLibrarySandboxNoPermission, NSUnderlyingError=0x60800045c3e0 "Sandbox access error."} (Error Domain=com.apple.lithium Code=330 "Sandbox access error." UserInfo=0x6080002e1800 {NSLocalizedDescription=Sandbox access error., NSFilePath=/Users/jamesbuckingham/Pictures/Photos Library.photoslibrary/Database/BigBlobs.apdb, LiResolvedPath=/Users/jamesbuckingham/Pictures/iPhoto Library/Database/apdb/BigBlobs.apdb, NSLocalizedFailureReason=Operation 'read' not permitted.})

09/04/2015 16:13:51.707 Photos[1293]: Failed to open/create library at: '/Users/jamesbuckingham/Pictures/Photos Library.photoslibrary'


Apr 9, 2015 2:47 PM in response to remedy005

remedy005,


It looks like it's getting stuck on a Database file in the iPhoto library.


I'd recommend trying two things:

  1. Repair your iPhoto permissions - hold down command + option and launch iPhoto. This will open the iPhoto repair / rebuild window.
  2. Repair your disk permissions - Open Disk Utility (/Applications/Utilities) and with your hard drive selected repair permissions.

Hoping one of these two things will repair the 'Operation 'read' not permitted' on the database file.


Then try and launch Photos and see if it works.

Apr 11, 2015 4:56 PM in response to Josho the mac

Hi All, For those of you who prefer a more hands-off approach that solved the permission repair problem for me I recommend using the highly reviewed application "iPhoto Library Manager." 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

Jun 14, 2015 3:09 PM in response to APizz

Knowing that I had seen thumbnails corrupt in previous versions of iPhoto (I'm now using Photos in Yosemite), I found my Photos library under my user dir and the sub-dir called Pictures. I shift-clicked on it and chose Open Package Contents. This will show you all the files of the photo library "database". Then I found the thumbnails and deleted them. I then launched Photos with Option-Command pressed, and the repair went well.


You'll loose your thumbnails, but photos will detect they are missing and rebuild them. Be patient!

Error while repairing permissions

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