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 have mountain lion and was fiddling with permissions on /usr/bin. I am locked out and get permission denied errors when I do ls -al on that folder.

I cannot use sudo as it says sudo not found. I can see the sudo folder under /usr/bin but I guess the permission and ownership issues is making it inaccessible.

Any pointer would be appreciated.

share|improve this question

migrated from stackoverflow.com Jan 1 '13 at 4:07

This question came from our site for professional and enthusiast programmers.

    
why where you messing with permissions on /usr/bin? Theres zero reason to do that.... –  prodigitalson Dec 31 '12 at 21:02
    
Installing some gems and needed to create a symlink to the gcc-4.2 installed with brew. –  sunny31 Dec 31 '12 at 21:05
add comment

2 Answers

up vote 3 down vote accepted

If it is just a permissions issue (and not ownership) you should be able to use Finder to fix it. Use Go to Folder (Shift-Command-G), go to /usr, click on the bin folder, bring up the information window (Command-I), click the lock in the lower right corner and authenticate, and then adjust the permissions.

They should look like this:

enter image description here

share|improve this answer
    
Thanks!! That worked. –  sunny31 Dec 31 '12 at 21:04
add comment

Seams like you royally screwed up. ^^, Find a magnet and with a steady hand rewrite permissions on your hard drive. This will take a really steady hand to execute as a minor error might damage the other contents of your hard drive.

Alternatively you could repair disk permissions like this: http://support.apple.com/kb/HT1452

share|improve this answer
    
Thanks Andreas, David's comment above resolved it. –  sunny31 Dec 31 '12 at 21:07
add comment

Your Answer

 
discard

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