Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 had a bit of a problem with some commands lately, not working as intended.
I wanted to fiddle with some Markdown and try it as a substitute for some simple HTML pages, so I looked into some easy to use tools and found pandoc.

I went ahead, installed it, it was succesfull and I opened
However, I am not able to run my command as normal user:

-bash: pandoc: command not found

If I do a man pandoc I am able to see the manual, so I know it is installed.

But I am able to run it as super user aka root.

If I try sudo pandoc I am able to use the tool,
for example sudo pandoc -s test.mdown -o test.html

What is the reason for this and is it easy to fix? It is working perfectly fine on my laptop, but not on my desktop computer.

My $PATH is /opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/texbin

Thanks in advance, this really grinds my gear.

share|improve this question
what does sudo which pandoc say? – parkydr Jan 20 '13 at 14:13
/usr/local/bin/pandoc – Filuren Jan 20 '13 at 14:17
What are the permissions and ownership of pandoc? – slhck Jan 20 '13 at 14:32
As I understand you, you are able to run the command as root user (using the command sudo pandoc), but not as normal user. What does ls -l /usr/local/bin/pandoc say? Maybe only root has permissions to execute the file? And what happens if you start it as /usr/local/bin/pandoc (with the full path)? – erik Jan 20 '13 at 14:38
ls: /usr/local/bin/pandoc: Permission denied so it looks like permission problems. If I try to run with full path I get -bash: /usr/local/bin/pandoc: Permission denied – Filuren Jan 20 '13 at 14:55
up vote 1 down vote accepted

Make sure that you have +x for /usr/local/bin. You would get a Permission denied error if this were a problem with the executable itself; as is, it appears to be a problem with the directory.

share|improve this answer
How do I do this? Just sudo chmod +x /usr/local/bin? EDIT: Looks like it's working now, thanks. Any reason why my permission was changed, I do not recall changing anything? – Filuren Jan 20 '13 at 14:55
You can check this by running ls -l /usr/local. Assuming root owns that directory, you would have to do sudo chmod a+x /usr/local/bin. – Nikita Kouevda Jan 20 '13 at 14:57

pandoc probably can't be found in the PATH for the root user. If you can log in as root, run

env | grep ^PATH

share|improve this answer

Your Answer


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.