OSX recovering ownership after bad chown command In hindsight, I made a bad decision, but I texted my wife a command:

sudo chown -R ${USER} /Applications/...


to run in a directory.  She didn't think it worked and started putting spaces where spaces shouldn't be, so she wound up running:

sudo chown -R ${USER} /


She shut it down after I told her she shouldn't have done that, and now I'm having no fun with this thing.

No biggie, I thought.  I've fatfingered some bad recursive commands in my past on Linux, but this is weird.  I've been repairing the root ownership from the recovery command line, but I don't know what happened to the user account.  When I look in /var/db/dslocal/nodes/Default/users/, I see daemon, nobody, and root. My wife's user home directory is still there, but the ownership everywhere is 501.

So, clearly I am having some issues trying to chown things back to where they should be, but on top of that I'm not even sure I can resurrect that user to make things seamless.

Any thoughts?

EDIT - Running OSX 10.11.4, El Cap
OS X Yosemite (10.10) and older:


Applications &rarr; Utilities &rarr; Disk Utility
Select the startup disk from the list of volumes.
Click the First Aid tab.
To check permissions, click Verify Disk Permissions. To repair permissions, click Repair Disk Permissions.


Source: https://support.apple.com/en-au/HT201560

You can also do it from Terminal using the diskutil command.

OS X El Captian (10.11):


Applications &rarr; Utilities &rarr; Terminal
To verify permissions:

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

To repair permissions:

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



Type your password when prompted. You'll need to be root or a member of the admin group.

Source: http://osxdaily.com/2015/11/04/verify-repair-permissions-mac-os-x/