TERMUX- bash: ./a.out: Permission denied

Viewed 6197

enter image description here

Why do I keep getting this error?

>> gcc a.out
>> ./a.out
bash: ./a.out: Permission denied

I even tried this

>> chmod +x a.out

But still I keep getting the error. I have installed clang and termux-setup-storage package. My files are in main memory (not on sd card).

Termux has only problem executing a.out file. If I make any error in C program it fails to compile the a.c file

2 Answers

You can't execute executable in internel storage because that's mount with noexec in android. Move that binary somewhere in termux home directory or $PREFIX.

so if you need to run those file than you need to run $ ls //to see your file is here or not .if not than change directory $ mv a.out ~ $cd ~ $chmod +x a.out $./a.out

Related