HT201560: Repair disk permissions with Disk Utility

Learn about Repair disk permissions with Disk Utility
elanvital8

Q: Permissions are supposed to be protected, but got screwed up anyway.  How to repair?

I'm having trouble with an application that wants to write to /tmp.  The repair for the issue is to run "Repair Disk Permissions" because the folder is not marked as writable, even though of course /tmp should be writable and owned by root.  It looks like my macports installation has done something and changed ownership of /tmp to "macports" and removed all but user write permissions.  I could easily repair the permissions on that directory manually, but the article indicates that file permissions are supposed to be protected now and so there is no tool to do it.  I want to run repair permissions to correct any other files that got out of whack.  Is there really no way to run such a tool anymore?

MacBook Pro (Retina, 15-inch, Late 2013), OS X El Capitan (10.11.2)

Posted on Jan 5, 2016 7:20 PM

Close

Q: Permissions are supposed to be protected, but got screwed up anyway.  How to repair?

  • All replies
  • Helpful answers

  • by Kappy,

    Kappy Kappy Jan 5, 2016 7:28 PM in response to elanvital8
    Level 10 (270,928 points)
    Desktops
    Jan 5, 2016 7:28 PM in response to elanvital8

    Repair the Hard Drive and Permissions - Yosemite, Mavericks, Mountain Lion or Lion

     

    Boot to the Recovery HD:

     

    Restart the computer and after the chime press and hold down the COMMAND and R keys until the menu screen appears.

     

    Repair

     

    When the recovery menu appears select Disk Utility and press the Continue button. After Disk Utility loads select the indented Macintosh HD entry from the the left side list.  Click on the First Aid tab, then click on the Repair Disk button. If Disk Utility reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported click on the Repair Permissions button. Wait until the operation completes, then quit Disk Utility and return to the main menu. Select Restart from the Apple menu. If you are running El Capitan, then click on the First Aid button in the toolbar. Note, however, that in El Capitan file permissions are locked and protected. They don't require repair.


    If you've run another program that has garbaged system files, then you will need to reinstall El Capitan.


    Reinstall El Capitan Without Erasing the Drive

     

    Boot to the Recovery HD: Restart the computer and after the chime press and hold down the COMMAND and R keys until the menu screen appears.

     

    Repair the Hard Drive and Permissions: Upon startup select Disk Utility from the main menu. Repair the Hard Drive and Permissions as follows.

     

    When the recovery menu appears select Disk Utility and press the Continue button. After Disk Utility loads select the indented Macintosh HD entry from the the left side list.  Click on the First Aid button in the toolbar. Wait until the operation completes, then quit Disk Utility and return to the main menu.

     

    Reinstall OS X: Select Reinstall OS X and click on the Continue button.

     

    Note: You will need an active Internet connection. I suggest using Ethernet if possible because it is three times faster than wireless and more reliable.


  • by Linc Davis,

    Linc Davis Linc Davis Jan 5, 2016 7:55 PM in response to elanvital8
    Level 10 (207,963 points)
    Applications
    Jan 5, 2016 7:55 PM in response to elanvital8

    /tmp is (or should be) a symbolic link to /private/tmp. The permissions of that folder are not restricted, and you can change them to owner root, group wheel, mode 1755.

  • by elanvital8,

    elanvital8 elanvital8 Jan 5, 2016 10:20 PM in response to Linc Davis
    Level 1 (0 points)
    Jan 5, 2016 10:20 PM in response to Linc Davis

    This helped put me in the right direction but for some reason it didn't solve the issue.  I had to find part of the answer in another post which related to the CoreTelephony error I was also seeing where it couldn't create /tmp/ct.shutdown.  In that post which I don't have handy to refer to right now, it said to go to /private in the Finder and use Get Info to modify the read/write settings.  When I set it to read/write for all, things worked again.  The permissions still are different than on my iMac which has:

    drwxrwxrwt  19 root  wheel  646 Jan  5 19:49 ./

     

    On my laptop where the problem was occurring the permissions show as:

    drwxrwxrwx@ 11 root  wheel  374 Jan  5 20:46 ./

     

    Can't seem to get rid of the @ symbol and I don't know what that adds to the mix.  It doesn't seem to be an ACL which I tried to remove.

  • by elanvital8,

    elanvital8 elanvital8 Jan 5, 2016 10:21 PM in response to Kappy
    Level 1 (0 points)
    Jan 5, 2016 10:21 PM in response to Kappy

    Thanks.  Seems very likely that reinstalling the OS would do it.  I was hoping for a less cumbersome method.

  • by Linc Davis,

    Linc Davis Linc Davis Jan 5, 2016 10:38 PM in response to elanvital8
    Level 10 (207,963 points)
    Applications
    Jan 5, 2016 10:38 PM in response to elanvital8

    It's not really clear what you're asking. If your only problem is the permissions of one directory, reinstalling the OS would be a very inefficient way to solve it. Permission repair is still possible in El Capitan:

     

    sudo /usr/libexec/repair_packages --repair --standard-pkgs