Long-time OS X users will have been used to using Disk Utility's Repair Disk Permissions function to sort out a number of different Mac issues.
At some point this function was taken out of the Disk Utility UI.
I recently had a problem which seemed to be entirely down to a user permissions problem, and wasn't able to use Disk Utility to fix it. Neither could I find a command line option (although in the last couple of months a few users have posted this fix elsewhere online.) So I asked Apple Support, and they told me.
It's easy when you know how...
Copy and paste this into the Terminal:
sudo diskutil resetUserPermissions / `id -u`
Hit Enter and type your login password when prompted.
This immediately fixed a persistent problem I've had for a couple of years. Hope you find it useful!