I compiled my C source with cc test.c, and it generated a file a.out.
However, when I run it, I get this error -
bash: ./a.out: Permission denied
My source is not in the home directory, it is on another FAT-32 partition, so I installed a disk on which the code uses the following command -
$ udisks --mount /dev/sda7 --mount-options umask=022
Mounted /org/freedesktop/UDisks/devices/sda7 at /media/48E9-FD53
$ cd /media/48E9-FD53/C
Then I compile my code with cc
I also tried gcc. But still I get the same error.
Then I did - chmod +x a.outall the same problem. Also with ( chmod 755 a.out) and chmod u+x a.out.
I also tried to compile and execute the program with sudo.
I also tried - sudo chown sannidhya:sannidhya a.out.
, googling, .
.out ( )?
. Ubuntu 12.04 LTS.
, chmod +x a.out, - ls -l a.out, -
-rw-r--r-- 1
, a.out, , Allow executing file as program, .