Centos – Permission denied when trying to execute a program as root on CentOS

centospermissions

I am logged as root on a CentOS server but I am not able to run a program.

I have compiled using cc a basic helloworld program, trying to run it outputs:


bash: ./a.out: Permission denied

I have tried to chmod +x a.out but no success.

The rights seems to be ok:


-rwxr-xr-x. 1 root 6426 Nov 15 10:50 a.out*

I don't know what this "*" means.

Best Answer

I am going to guess that filesystem that is underlying the directory the file is in is mounted with the noexec attribute which will disable the execution of files.