Fixing/Correcting OS X home folder file permissions
First, make sure you own your home folder (note: I'm assuming you're running this from your own user account, and that you're an admin):
sudo chown -R $USER:staff ~
Then, give yourself proper access and nobody else any access (we'll make some exceptions later). Note that this is 2 commands to make sure that execute access gets added to the directories, but not plain files:
chmod -R 600 ~
chmod -R u+rwX ~
Now, grant read access to others for the directories they're supposed to have access to. If you don't have a sites folder, you can leave that off the second command:
chmod og+rX ~
chmod -R og+rX ~/Public ~/Sites
Apple likes to have access control entries to keep you from messing with "important" parts of your home folder. Again, if you don't have Sites you can leave that off (do not leave out Library; it's invisible, but it's there):
chmod +a "group:everyone deny delete" ~ ~/Desktop ~/Documents ~/Downloads ~/Library ~/Movies ~/Music ~/Pictures ~/Public ~/Sites
Finally, fix your Drop Box:
chmod og=wX ~/Public/Drop\ Box
chmod +a "user:$USER allow list,add_file,search,delete,add_subdirectory,delete_child,readattr,writeattr,readextattr,writeextattr,readsecurity,writesecurity,chown,file_inherit,directory_inherit" ~/Public/Drop\ Box
Note that this procedure will not properly "fix" the permissions on files inside your various folders, but that doesn't really matter since it gives you full access to them and nobody else can get into the folders anyway...
To Reset file permissions and Access Control Lists (ACLs) of your user's home directory to their default settings do this:
- Boot into the Recovery mode by holding down the Command and R keys during boot.
- Open the terminal (under the Utilities menu)
- Type
resetpassword
into the terminal and hit Return. - In the Reset Password utility window choose the correct volume, and on the bottom you’ll see an area labeled ‘Reset Home Folder Permissions and ACLs’. Click the Reset button in that area.
- Close windows, quick OS X Utilities, restart.