0

My computer has two hard disks (1 SSD + 1 HDD). I have installed operating systems in SSD and made HDD as a NTFS drive (named as 'WorkData'; and the location is /media/WorkData), so that I can work in that HDD from both Ubuntu and Windows.

I have compiled a program (named as 'chem') in 'WorkData' and tried executing it by ./chem command. However, I am getting the error 'bash: ./chem: Permission denied'.

I tried following ways to fix it:

  1. Used, chmod u+x chem => No use.
  2. Tried the option in the link => No use.
  3. Tried the option in the link => No use.

Can some one help me in this regard?

2
  • does it work if you use sudo? who is teh files owner/group? if you use chmod o+x chem does that fix it? Jun 30, 2016 at 22:36
  • Ubuntu can read a NTFS partition, but it won't obey the permission on it, since it knows nothing about how to do that. So this permission problem is a Linux permission problem
    – Ramhound
    Jun 30, 2016 at 23:03

1 Answer 1

0

mount the partition with the exec option, specified after the users option, or specify a umask of 022 as a mount option

2
  • Can you explain what these commands actually do?
    – Burgi
    Jul 1, 2016 at 7:37
  • the exec option grants all permissions checks the ability to run executables on that disk. The umask option says "permissions on this disks will be 755 for all directories" which gives everyone the right to run executables. Since Linux doesn't "get" NTFS in a native fashion, you are using the disks mount options to establish global permissions for the disk that linux can use. Jul 1, 2016 at 11:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .