10.8.3 update and ShareKitHelper crashing

After updating to 10.8.3 this morning I was quickly presented with this dialog box:


User uploaded file

Entering my administrative account password would cause that box to go away for a minute, then come back. Eventually I tired of entering my password and was getting suspicious.


tailing the system log I discovered that


Mar 18 08:47:51 my-iMac.local xpcd[180]: com.apple.ShareKitHelper[773]: registration request failed: (0x11, 0x0) Container object initialization failed: NSCocoaErrorDomain:513 “com.apple.iWork.Pages.plist” couldn’t be moved because you don’t have permission to access “Preferences”.


Source: ~/Library/Containers/com.apple.ShareKitHelper/Data/Library/Preferences/com.appl e.iWork.Pages.plist

Dest: ~/Library/Containers/com.apple.ShareKitHelper/OldData/20130318T084751.82-0700/L ibrary/Preferences/com.apple.iWork.Pages.plist

Destination permissions info:

0 stat: 2

-1 o:User m:040700 f:()

fs: hfs, fsid: 1000002/11, mf: 0480d000

-2 o:User m:040700 f:()

fs: hfs, fsid: 1000002/11, mf: 0480d000

-3 o:User m:040700 f:()

fs: hfs, fsid: 1000002/11, mf: 0480d000

-4 o:User m:040700 f:()

fs: hfs, fsid: 1000002/11, mf: 0480d000

-5 <CONTAINER> o:User m:040700 f:()

fs: hfs, fsid: 1000002/11, mf: 0480d000

-6 o:User m:040700 f:()

fs: hfs, fsid: 1000002/11, mf: 0480d000

-7 <LIBRARY> o:User m:040700 f:hidden

!#acl 1

group:ABCDEFAB-CDEF-ABCD-EFAB-CDEF0000000C:everyone:12:deny:delete


fs: hfs, fsid: 1000002/11, mf: 0480d000

-8 <HOME> o:User m:040755 f:()

!#acl 1

group:ABCDEFAB-CDEF-ABCD-EFAB-CDEF0000000C:everyone:12:deny:delete


fs: hfs, fsid: 1000002/11, mf: 0480d000

-9 o:Root m:040755 f:()

fs: hfs, fsid: 1000002/11, mf: 0480d000


Seems like a cut-and-dried permissions problem... until you realize this ShareKitHelper is the process creating those directories! (I have a couple dozen of them now, all created this morning since the update began trying to run) I have worked my way down the directory tree checking permissions all along the way and there are no special permissions to any of the parent directories, except, naturally, the ~/Library directory being hidden from Finder.


If anybody else has already figured out a way around this, please share. I'll add more as I find more.

iMac, OS X Mountain Lion (10.8.3)

Posted on Mar 18, 2013 9:11 AM

Reply
15 replies

Mar 18, 2013 11:10 AM in response to jimoly

Problems such as yours are sometimes caused by files that should belong to you but are locked or have wrong permissions. This procedure will check for such files. It makes no changes and therefore will not, in itself, solve your problem.

First, empty the Trash.

Triple-click the line below to select it, then copy the selected text to the Clipboard (command-C):

find ~ $TMPDIR.. \( -flags +sappnd,schg,uappnd,uchg -o ! -user $UID -o ! -perm -600 -o -acl \) 2> /dev/null | wc -l

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.

☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.

Paste into the Terminal window (command-V). The command may take a noticeable amount of time to run. Wait for a new line ending in a dollar sign (“$”) to appear.

The output of this command, on a line directly below what you entered, will be a number such as "41." Please post it in a reply.

Mar 18, 2013 11:10 AM in response to jimoly

I tried rebooting in recovery mode and repairing permissions, with no effect on the symptom.


I downloaded the 10.8.3 combo updater and applied that, with no effect on the symptom. My original update was via the automatic software update mechanism.


I just tried launching Mail.app, and got a very similar error, which is just too weird:


Dest: ~/Library/Containers/com.apple.mail/OldData/20130318T110342.99-0700/Library/Pre ferences/com.apple.iWork.Pages.plist


Now why on earth Mail and Pages are being intermingled is beyond me. And it's not just Mail. It seems any app that shows the unified Photos/Movies/Music interface is being impacted by this, while more "stand-alone" apps are not.


I don't have much choice but to reinstall system software.

Mar 18, 2013 12:36 PM in response to Linc Davis

I moved ~/Library/Containers to the desktop and rebooted prior to seeing your post.


After that move and reboot, I'm not getting the error, but of course many apps are restablishing their preferences.


Your find command returned


136935


Since you finished with a line count, I removed that to see what was making up 136K files... it's pretty much every file in my home directory. Finder claims there's only 86K files in my home directory, but since it hides ~/Library from view, it could be under reporting.


I selected one file at random, fr.qm deep within the Google Earth plugin, and did a ls -alGe@ on it and found it has a com.apple.quarantine attribute. As far as I recall, that's an attribute assigned to files on a TimeMachine backup, but that should have been removed when restoring from TimeMachine backup, a process I did do back around the time 10.8.2 came out.

Mar 18, 2013 1:47 PM in response to jimoly

Back up all data. Don't continue unless you're sure you can restore from a backup, even if you're unable to log in.

This procedure will unlock all your user files (not system files) and reset their ownership and access-control lists to the default. If you've 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.


Step 1

If you have more than one user account, and the one in question is not an administrator account, then temporarily promote it to administrator status in the Users & Groups preference pane. To do that, unlock the preference pane using the credentials of an administrator, check the box marked Allow user to administer this computer, then reboot. You can demote the problem account back to standard status when this step has been completed.

Triple-click the following line to select it. Copy the selected text to the Clipboard (command-C):

{ sudo chflags -R nouchg,nouappnd ~ $TMPDIR.. ; sudo chown -Rh $UID:staff ~ $_ ; sudo chmod -R u+rwX ~ $_ ; chmod -R -N ~ $_ ; } 2> /dev/null

Paste into the Terminal window (command-V). You'll be prompted for your login password, which won't be displayed when you type it. 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 will take a noticeable amount of time to run. Wait for a new line ending in a dollar sign (“$”) to appear, then quit Terminal.

Step 2 (optional)


Step 1 should give you usable permissions in your home folder. This step will restore special attributes set by OS X on some user folders to protect them from unintended deletion or renaming. You can skip this step if you don't consider that protection to be necessary, and if everything is working as expected after step 1.

Boot into Recovery by holding down the key combination command-R at startup. Release the keys when you see a gray screen with a spinning dial.

When the OS X Utilities screen appears, select

Utilities ▹ Terminal

from the menu bar. A Terminal window will open.

In the Terminal 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 boot 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.

Mar 18, 2013 6:51 PM in response to Linc Davis

I have the exact same symptom. I've done the above two step sudo chmod commands and the reset of permissions and ACLs. . .restarted and no effect.


I then manually updated to 10.8.3 (vice auto-update first time) with the new permission in place in case something had gone awry on my first install. Restarted and again, same thing.


Application Specific Information:

Sandbox creation failed: Container object initialization failed: NSCocoaErrorDomain:513 “com.apple.iWork.Pages.plist” couldn’t be moved because you don’t have permission to access “Preferences”.


Source: ~/Library/Containers/com.apple.mail/Data/Library/Preferences/com.apple.iWork.Pa ges.plist

Dest: ~/Library/Containers/com.apple.mail/OldData/20130318T212608.10-0400/Library/Pre ferences/com.apple.iWork.Pages.plist


Looking in the directories, I wonder if the permissions aren't a red herring. The Dest directory permissions look find and I even cd'd to the destination directory as the user and ran a touch command to create a dummy file without issue. The source reference, however, is a link to a file that doesn't exist:


$ cd ~/Library/Containers/com.apple.mail/Data/Library/Preferences

$ ls -ltr *ork*


lrwxrwxr-x+ 1 username staff 54 Mar 3 14:21 com.apple.iWork.Pages.plist -> ../../../../../Preferences/com.apple.iWork.Pages.plist


$ cd ../../../../../Preferences

$ ls -ltr *ork*


-rw------- 1 username staff 182 Mar 18 21:15 com.apple.frameworks.diskimages.diuiagent.plist


Not that this helps me get to my mail. . .wondering if I should just delete the preferences. This is a brand new machine for my wife who hasn't really used it yet, I'd just like to avoid the pain that was importing 5years of email from Outlook.

Mar 18, 2013 11:08 PM in response to EagleNdc

LIke I said, mine was fixed by moving the ~/Library/Containers out to the desktop and rebooting. Haven't had an issue since, whereas before Mail and Aperture would just crash when I gave my password for the permissions to be fixed.


After performing the first suggested sudo command that was setting flags, ownership and permissions I reran the count. My count dropped to 34413.


After rebooting into recovery disk and using the resetpassword tool to reset home directory permission and ACLs my count dropped to 24935.


For what it's worth, here's the directory entry on my system for the Containers/com.apple.mail/Data/Library/Preferences entry for Pages:


lrwxr-xr-x+ 1 myuser staff 54 Sep 29 13:34 com.apple.iWork.Pages.plist -> ../../../../../Preferences/com.apple.iWork.Pages.plist

0: group:everyone deny write,delete,append,writeattr,writeextattr,chown


And following that link (a bit of conjecture on my part as to where it really went since I moved my Containers folder, but I'm presuming it was looking for ~/Library/Preferences/


ls -alGe@ com.apple.iWork.Pages.plist

-rw------- 1 myuser staff 2378 Feb 25 19:20 com.apple.iWork.Pages.plist


Since this all seemed to be tied to the ShareKitHelper, I followed the hunch and tried launching all apps that share your photos, movies and music and they all would crash. Other apps, like Safari and Terminal, do not "share" your iLife stuff and had no problems.

Mar 19, 2013 6:34 AM in response to jimoly

Thanks. I went ahead and moved the containers directory and that immediately allowed me access to mail. Mail isn't connecting right now, but I'm thinking the reboot will get me there (unfortunately had to run out for work). Just curious on the root cause and based on you hunch of ShareKitHelper, had you modified any file level permissions? I had changed my wife's Pictures directory permissions so that I could point my iphoto to her library. . .wondering if that may have confused the update.


I'll let you know if the reboot made all well again when I get home.

Mar 19, 2013 6:51 AM in response to EagleNdc

My first launch of Mail after setting aside the old Containers directory saw the Message Viewer appear on the wrong screen and at a different size, with the side bar hidden, my customarily expanded collection of Smart Mailboxes closed up; so I assumed that on the march to fully sandboxed apps in a future OS developers are starting to place their user defaults in this Containers directory rather than the older ~/Library/Preferences/. But apparently unlike you, my Mail was immediately *working fine* -- i.e. it downloaded waiting mail, etc.


To answer your question, I can not say that I had intentionally altered permissions within my home directory for any clever purpose like you had. I do iOS development on this machine, so there's all manner of weirdness possible ;-) But this machine (late 2011 27" iMac) has a history of weirdness: Its attached 27" Thunderbolt display only works (as in recognized by the iMac) when situated to the right of the iMac's display. That's germane to this issue because until discovering that it had to be to the right of the display I was working with my local Apple store and they could get their TB display to work with my iMac when booted off their NetBoot server so they advised that I reinstall the OS. Which I have done a number of times (clean) but also restored from TimeMachine backup... and it's that TimeMachine backup that is where I learned about the com.apple.quarantine attribute. Unfortunately, those are all details that come out of the cobwebs and I dont' have a complete recollection of the order of events anymore. (For the good of the order, when my iMac was in at the Apple store, their TB display was to the right of my iMac as we sat working on the Genius bar table top).

Mar 26, 2013 5:09 PM in response to jimoly

I had exactly the same problem this evening after running the latest OSX update. I tried the simple fix of moving the Containers folder to the desktop (and renaming it for good measure) - it worked, so thanks jimoly for the tip.


Does anyone know what the Containers folder is for anyway? I notice that most of the files at the end of the directory trees under Containers are aliases, including the com.apple.iWork.pages.plist 'file' that the crash report mentioned. As far as I could see there was nothing unusual about the permissions set on my ~/Library folders anyway, so I agree with EagleNdc's comment that permissions is probably a red herring.


Anyway, moving the Contatiners folder and allowing OSX (and/or apps - I'm not sure which it is) to re-create it seems to have worked.

Mar 26, 2013 5:17 PM in response to Richard0102

I maintain that it is a sandbox step as security tightens down on the Mac. Developer notes would probably be definitive. In the interim to a total sandbox model like iOS the old directory structure is replicated inside an app's container (so apps don't need to be totally revamped) and soft linked to the current structure in Library/Preferences.


I noticed after moving the Containers directory aside that Mail is starting over in many ways. Sadly my junk mail training has begun anew.

Mar 28, 2013 10:03 AM in response to jimoly

This solution is what worked for me! I was having a similar problem and message when trying to open Preview.I stumbled across a range of other permissions-related suggestions for troubleshooting -- none of which worked, including the ones in this thread. The only think that worked was to move the "Containers" folder to the desktop and reboot. Preview worked again immediately after restart.


I wish I would have found/tried this first.


THANK YOU!

Dec 14, 2013 2:10 AM in response to jimoly

What seems to happen when one removes the ~Library/Containers folder is this: OS X recreates the folder and changed the permissions as follows (from system.log):


restored permissions (100600 -> 100700) on /Users/priit/Library/Containers/com.apple.ShareKitHelper/Container.plist


Now, the permissions on that file look like this:


-rwx------ 1 priit staff 47416 14 dets 11:36 /Users/priit/Library/Containers/com.apple.ShareKitHelper/Container.plist


Since then, no more crash reports from ShareKitHelper under my account!

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

10.8.3 update and ShareKitHelper crashing

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