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.
By Rob Wilkerson July 6, 2007 - 9:04 am
sudo is good. And handy as hell. I've used the Repair Permissions utility several times, but never realized that it didn't touch user directories. That info may serve me well in the future...
By Jennifer Rodgers July 13, 2007 - 12:37 pm
This did not work for me at all...is there anything else that I can do?
By sal July 31, 2007 - 9:24 am
@ Jennifer,
perhaps try repairing permissions in octal.
sudo chmod -R 770 /Users/username
ahh the beauty of OS X...
cheers
By Jared James August 10, 2007 - 10:31 pm
THANK YOU. If I weren't a guy I'd kiss you, but an internet high-five will have to do.
I ended up doing same thing.. changed the permissions on my home folder in the term (don't know why I did that?). This fixed it up!
Oh, and btw, you actually don't have to restart your Mac to get this to work. You can just "relaunch" the Finder. It'll recognize the changes after that.
By saving to HD after firewire transfer from old iMac - MacNN Forums August 13, 2007 - 5:10 pm
[...] Originally Posted by rsharma However, I am need to give my password before it allows me to proceed, to verify I am an administrator. Also, it seems that a lot of the files I transfered are now 'read only'. Is there anyone that could shed some light on the topic and help me fix it. This is the same problem. Permissions are incorrect. Easiest solutions require using the terminal though. First, make sure you have a backup user account with admin privileges. Then try: sudo chown -R username /Users/username Here username is your short user name, the name of the folder in the Users directory of the hard disk. It will ask you for your password in order to do this. Then log out and log back in. If that doesn't work, these instructions should apply. [...]
By matt July 15, 2008 - 12:48 pm
my problem is that i need to fix an application's permissions. how would i do that in the terminal?
By Clayton August 9, 2008 - 9:48 am
Yo I Have 2 things to Speed up this
First Since OS X is Fully Unix Based, it knows ~ is your home dir. In Short The Command Used to Be Completely Safe is:
sudo chmod -R ug+rwX ~
And @Matt What App is It? There are Some Apps That Must Be System Owned Which is a Little Harder to do!
thanks
By ethicalhacker October 23, 2008 - 2:09 pm
So, in summary:
sudo chmod -R 770 ~
By Barry Ryan January 6, 2009 - 8:50 pm
I recently purchased a Mac Book Pro. I do home recording and I installed MOTU Digital Performer 5.13 but when i attempt to open it I get the following message Mac OS error: Access Denied. Insufficient access privileges for the operation. I saw your posting and tried the sudo chmod -R ug+rwX~. When i did this I was able to open the program but only once. The second time I tried to open it I got the same message and it wouldn't open. Any help would be greatly appreciated. Thanks.
By Ben Tortora February 2, 2009 - 12:36 am
You saved my Dreamweaver CS3. I rang adobe tech support today and they couldnt help me at you.
You my friend did, and I am forever in your debt.
So remember this for when dreamweaver is not playing nice
By Fixing Errors in Dreamweaver CS3 and Firefox on Mac - OSX February 2, 2009 - 2:43 am
[...] How to Repair User Permissions [...]
By Shane February 10, 2009 - 2:14 pm
When I type
http://localhost/~username
in my web browser I get this in return
Forbidden
You don't have permission to access /~username on this server.
By Sam Coupe March 4, 2009 - 2:02 pm
Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you!!!!!!!!!!!!!!!!!!
It worked, now I can dump the virus-ridden PC I've been using whilst my Mac was poorly!
By Ryan July 3, 2009 - 11:42 am
Explain this. When using either -R 770 ~ or sudo chmod -R ug+rwX /Users/User, the permissions on my home folder change to include wheel read/write permissions. How and why is wheel showing up?
By Juan Carlos de Burbon January 13, 2010 - 3:07 pm
WARNING!!!
This is the wrong command to run on your home folder.
It "breaks" several things.
The permissions on the Sites folder and on the Public folder are not the same as the rest of the folders in your home folder. If you run this command on your home folder, Web Sharing will not work and people will not be able to access your Public folder to retrieve document or put them in your Drop Box.
By Juan Carlos de Burbon January 13, 2010 - 3:11 pm
Just to qualify my post, which I didn't do, I was referring to "sal's" post:
sudo chmod -R 770 /Users/username
Bad, very bad and a complete misinterpretation of the original command.
By partical May 3, 2010 - 10:06 am
i just recently upgraded from my old mac to a new one, and when i was typing the user name i put winron instead of winton. now all my folders have the name winron instead of winton, although i alraedy changed the user name to winton the settings for all my folders are still winron. i ran the disk utilily and all my files are still winron. how do i use this command in my case??
Thanks
By Kevin Rohrbaugh May 24, 2010 - 7:57 pm
FYI: As of Mac OS X 10.5 and higher, you can repair home directory permissions using the Reset Password Utility from the OSX install disc: http://support.apple.com/kb/ht1452
That's probably the safest bet.
By Rafael Perez April 15, 2011 - 7:20 am
I recently upgraded to OSX, and now I can't print several Quark files. I'm able to print most of them, but some of the newest files, even though I can open them, when printing, the printer simply receives a signal, and nothing prints. Now I created a new administrator user, and was able to print all files, but my presets are gone. Does anyone now how can I fix this in order to print all files with my normal user? or How can I copy or import my user presets to the new administrator user?
By Delphine Chen June 20, 2011 - 8:16 pm
Thank you so much!! I was having trouble with X11 taking _minutes_ to open when it used to only take a few seconds. It was a home folder permissions problem, and this fixed it. I don't know how my folder permissions were changed either (running Mac OS X 10.6.7). Seems like this permission change is happening unbeknownst after OS X upgrades, from the posts I saw trying to find a solution to my problem...why is that? Anyway, X11 now starts in a flash. Thank you!!!
PS: why did I get a warning about being careful using sudo to change permissions? Just curious...I haven't noticed anything wrong yet.
By Happydude May 6, 2012 - 12:39 am
Just wanted to say thanks! I was fiddling with permissions and propagations until I broke something. This fixed it