I compiled my C code using gcc and it gave me a .out file. Now I am trying to execute the output file using terminal it keeps on showing me some error
gcc
.out
fish: The file “./core.out” is not executable by this user.
fish: The file “./core.out” is not executable by this user
I am using fish shell - But I am getting same error on bash shell as well. I can't understand what could be the reason for this.
Command I used for gcc
gcc core.c -o core.out
Output of file core.out is
file core.out
core.out: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, > BuildID[sha1]=28e5ebcbdf1336774f74c7167a529a05af4e236b, for GNU/Linux 3.2.0, not stripped.
core.out: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, > BuildID[sha1]=28e5ebcbdf1336774f74c7167a529a05af4e236b, for GNU/Linux 3.2.0, not stripped
Error I am getting is:
It was the noexec option on the mounted partition. It's working fine and as expected after remounting. Thanks
noexec
2.1m questions
2.1m answers
60 comments
57.0k users