I’m in the process of setting-up a new Apple MacBook Pro today, and during the process of trying to import and get some old SSH keys working correctly I accidently changed the permissions on my home directory. Even after scrolling back through the commands I used I’m still not even sure how it happened, but nonetheless I had to find a way to fix it.
Anyhow there are several symptoms you’ll see if the permissions are wrong in your user folder such as:
- If you’re browsing to your home folder using Finder and get a message like ‘The folder “username” could not be opened because you do not have sufficent access privileges’
- When trying to access your home folder in a terminal, you keep getting redirected back to /
Basically if you can’t access your home directory in Mac OS X, this blog entry is for you. There is a “repair permissions” utility in OS X but it does not repair permissions for user directories, so you have to take care of it manually.
To repair a specific users permissions in Apple OS X, type the following command in a terminal and replace “username” in the command below with the name of the users permissions you need to fix:
- $ sudo chmod -R ug+rwX /Users/username
You’ll need to reboot so that Finder will pick-up the permission changes, but that should clear-up any user specific permission problems if you are locked out of your home directory.