Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I accidentally set the permission of my hidden 'usr' to 'no access' (meant read only). Now no applications can open (they just bounce).

When trying to sudo cd or ls in terminal, I simply get:

bash: /usr/local/rvm/scripts/initialize: Permission denied

and

Illegal instruction: 4

respectively. Argh catch 22!

Any ideas, people?

share|improve this question

2 Answers 2

up vote 1 down vote accepted

Do you have a backup?

If not, you should be able to fix the permissions by booting into Single User Mode. Hold CmdS while rebooting, and in the prompt, enter mount -uw /.

Then try running:

chmod u+r /usr

which should give the owner read permissions again. You can, of course, do that recursively by calling chmod -R u+r /usr, depending on what exactly you did to screw up your permissions.

If you also changed the owner, you can set it back to root:wheel for /usr and its subfolders, except for /usr/local, which should probably be username:admin (where username is your admin user's name).

Once you're done, type reboot.

share|improve this answer
    
Thanks a lot slhck! –  Starkers May 3 '13 at 19:49

I am not in front of my Mac but I believe in either Disk Utility or the info of the direcory there is a item call fix disk permissions, you may be about to call it and that should solve your issue as well.

As a side note if you get permissions denied error try running it with sudo as long as you are sure you know what you are doing. The sudo password is just your login password.

share|improve this answer
1  
I think the problem was that the OP couldn't even open any application (like they said, they would constantly bounce), and sudo lives in /usr/bin, so they couldn't even use sudo because it doesn't have read access anymore. –  slhck May 4 '13 at 6:54

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.