cd /media/k4li/data2/C gcc program.c ./a.out
bash: ./a.out: Permission denied
if I enter
sudo ./a.out i get:
sudo: ./a.out: command not found
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community
Because NTFS doesn't store or use "Linux" file permissions the kernel emulates them. You set the entire mount partitions permissions at mount time. You have two option.
Remount the NTFS partition, setting the permissions to something less restrictive. This is the least secure option.
Move the executable to your Linux partition, then chmod it, then run it. There are more steps here but this is the most secure option.
2 is more secure then 1 because you only change the permissions of one file, not the entire partition.