0

So lately I've been in C programming. On trial and Error and Basis I tried Compiling(GCC) and Executing(./a.out) from my Windows' partition and Pen-drive i.e. precisely I tried executing on NTFS and FAT. I'm currently using Ubuntu 14.04(32bit) and executing via Terminal.

PROBLEM:- When I tried executing C program in Terminal (in Pendrive), It returns a following error

bash: ./a.out: Permission denied

Here's what I tried:

(1)WITHOUT ROOT-

tj@tj-HP-Pavilion-dv4-Notebook-PC:/media/tj/HP/TJbin$ gcc phil.c -pthread -o dine
tj@tj-HP-Pavilion-dv4-Notebook-PC:/media/tj/HP/TJbin$ ./dine
bash: ./dine: Permission denied

(2)WITH ROOT-

root@tj-HP-Pavilion-dv4-Notebook-PC:/media/tj/HP/TJbin# gcc phil.c -pthread -o dine
root@tj-HP-Pavilion-dv4-Notebook-PC:/media/tj/HP/TJbin# ./dine  
bash: ./dine: Permission denied

Explanation- Since without root, it returned an error "Permission denied"; I tried it with root, but no success.

Question-

  1. Is it necessary that an C program must reside on EXT partition?
  2. Is there any command that will grant the permission?
  3. Does it need .exe for NTFS or FAT and if so can it be executed in Terminal?
T3J45
  • 176

0 Answers0