diskutil resetUserPermissions / `id -u`

Discussion in 'macOS' started by toke lahti, Jul 27, 2019.

  1. toke lahti macrumors 68020

    Joined:
    Apr 23, 2007
    Location:
    Helsinki, Finland
    #1
    Can anybody tell what those switches mean?
    Anybody researched this undocumented switch further?
     
  2. chabig macrumors 603

    Joined:
    Sep 6, 2002
    #2
    Apple has a support article on this. It doesn't say exactly what those do, but you can probably deduce it from the description of when you might want to use that command.

    https://support.apple.com/en-us/HT203538
     
  3. NoBoMac Moderator

    NoBoMac

    Staff Member

    Joined:
    Jul 1, 2014
    #3
    Semi educated guess: / is the root volume of your internal disk, the "id -u" part, run the id command with the -u switch to get the id number of your account. And you do need the tick marks around the id part.

    Try typing in at the Terminal just "diskutil resetuserpermissions" to see if you get a mini help reply: that might give some detail on what will happen.
     
  4. toke lahti thread starter macrumors 68020

    Joined:
    Apr 23, 2007
    Location:
    Helsinki, Finland
    #4
    Looks like there is a reason why Apple insist keeping homeFolder in the internal:
    Code:
    Last login: Fri Jul 26 19:14:16 on console
    Mini2018:~ toke$ diskutil resetUserPermissions /Volumes/SSDhomeDir `id -u`
    Ready to reset user permissions on disk6s1 SSDhomeDir
    Started verify/repair permissions on disk6s1 SSDhomeDir
    Error: -69838: Operation not supported for the macOS version on the targeted disk
     
  5. NoBoMac Moderator

    NoBoMac

    Staff Member

    Joined:
    Jul 1, 2014
    #5
    Did you follow the steps in @chabig link? There is a section there re: what to do if you get that error.
     
  6. chown33 Moderator

    Staff Member

    Joined:
    Aug 9, 2009
    Location:
    bedlam
    #6
    If the external disk has a bootable system on it, try booting from it, then repairing with:
    Code:
    diskutil resetUserPermissions / `id -u`
    
    It would only be necessary to run from the external for as long as it takes to do the repair.


    If the OS (or user folder) isn't the same version as one is booted from, it's possible that diskutil is overly cautious about attempting repairs. This could be the reason for the error message, but that's just a guess, because we don't know which OS versions are being used here. That could be useful info to post.
     
  7. toke lahti thread starter macrumors 68020

    Joined:
    Apr 23, 2007
    Location:
    Helsinki, Finland
    #7
  8. toke lahti thread starter macrumors 68020

    Joined:
    Apr 23, 2007
    Location:
    Helsinki, Finland
    #8
    It would be pretty nice, if Apple could allow repairing permissions just within one home folder.
     

Share This Page

7 July 27, 2019