Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

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

After compiling a C program on Ubuntu 10.10, after executing chmod +x ./a.out, I am still getting bash: ./a.out: Permission denied. How can I run my new executable?

share|improve this question
Are you the owner of the file? You're not building as root, are you (using sudo, etc)? – Marty Fried Jul 8 '12 at 20:16

One possible reason is that you are compiling on a file system that has been mounted with the noexec option.

Run mount -l to see the options that file systems are mounted with.

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.