Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 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
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

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:

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

You must log in to answer this question.