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 changed to zsh from the default (by changing the "Shells open with" preference in Terminal to "command (complete path)" set to /bin/zsh

While most things seem to work, I tried to see the man page for a command and got a "permission denied" message. When I tried sudo, I got "man: command not found".

I changed to the default shell (/bin/tcsh), and this is what I get when I open a new shell:

Last login: Fri Nov 18 13:53:50 on ttys000
Fri Nov 18 13:55:21 CST 2011
/usr/bin/manpath: Permission denied.

If I try man, I get the same "command not found message". I guess there is something wrong in my PATH, but I have no idea how to fix it. "echo $PATH" (in tcsh) gets:

/sw/bin:/sw/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/texbin

In zsh, it gets:

/usr/bin:/bin:/sw/bin:/usr/local/bin:/usr/local/teTeX/bin/powerpc-apple-darwin-current:/usr/sbin:/sbin:/usr/texbin:/usr/X11/bin

Any ideas?

share|improve this question
add comment

1 Answer

There's something wrong in your PATH all right, but not in the value of the PATH variable. Rather, you've screwed up the permissions of /usr/bin or the files within it. Run

ls -ld / /usr /usr/bin /usr/bin/manpath

You should see rwxr-xr-x permissions for all four. If you don't, fix the permissions. This command should restore permissions to sane values:

chmod 755 / /usr /usr/bin /usr/bin/*

It's possible that there are other files on your system that have broken permissions; look around and see.

share|improve this answer
add comment

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.