Errors in Compilation Cause No Execute Permission


If non-fatal errors occur while you are compiling your program, the executable version of the program (a.out) is created without execute permission. If you attempt to run this program, you will get an error message:
a.out: Permission denied.
You need to fix the errors in your source code and compile it again before attempting to execute the program.