Celeb Glow
news | March 25, 2026

How to overcome "Permission denied" running C program even after "chmod +x"?

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?

1

2 Answers

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.

If you are compiling the program and running the executable file on an external drive or something similar, move the file to Desktop and recompile and run it there.

0

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy