System: RHEL8 4.18.0-372.19.1.el8_6.x86_64 Selinux: Enabled FIPS: Enabled
Program:
#include <stdio.h>
int main( void )
{
fprintf( stdout, "Running test Program...\r\n" );
}
Compile:
gcc test.c -o test
Run Program:
./test
-bash: ./test: Operation not permitted
It doesn't work.
List Directory:
$ ls -l
total 24
-rwx------. 1 dev dev 18088 Aug 9 13:01 test
-rw-r--r--. 1 dev dev 95 Aug 9 13:00 test.c
List File Attributes:
-------------------- ./test.c
-------------------- ./test
Mounted Partition:
There is -> no <- "noexec" set.
Run as root:
sudo ./test
Running test Program...
It works running as root.
What am I missing here?
I have read, write, and execute permission for this file.