How to overcome "Permission denied" running C program even after "chmod +x"?
5,299
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.
Related videos on Youtube
Author by
Nagendra Kumar
Updated on September 18, 2022Comments
-
Nagendra Kumar over 1 year
After compiling a C program on Ubuntu 10.10, after executing
chmod +x ./a.out
, I am still gettingbash: ./a.out: Permission denied
. How can I run my new executable?-
Deepak Verma almost 12 yearsAre you the owner of the file? You're not building as root, are you (using sudo, etc)?
-