Can't set permissions for files on an NTFS partition

I remember that I was able to run a Linux .exe that was placed on an NTFS partition earlier before I installed 10.10 RC. But if I try to run it now, I can't run it as it hasn't the execution permission. The bad part is that I can't change the permissions too. I'm chmod-ding +x but no change at all with its permissions.

So this seems to be a bug? Any help?

Though when I put it on ext4 partition, I can set the permission. But I want to do this as I did before, right from its default NTFS location.


NTFS doesn't support the execute permission because it's designed for Windows, which doesn't have the same concept of "executable" files as Linux does. If you're trying to run Windows .exe files in Wine, it should still work if you run wine explicitly, like this:

wine /path/to/executable.exe

If you do need to execute files directly, you can set the permissions that will be applied to all files with the fmask option in /etc/fstab. You may also need to add the exec option if that's not the default for NTFS (I don't have a drive handy to check right now). The value for fmask tells the driver which bits to turn off, so, for example, to allow read, write, and execute for all users, you should have something like this:

/dev/hda1  /mnt/windows  ntfs-3g  defaults,exec,fmask=000  0  0

If there's already an fmask option, the simplest way to turn on the execute bit is to subtract 1 from any digit that's odd.

If you don't know how permission masking works, the basic idea is that the read, write, and execute permissions are represented by the values 4, 2, and 1 respectively. You can add them together to combine permissions so, for example, reading + writing would be 6. The permission mask is a combination of three digits that apply to the owner, group, and "others" (everyone else).

Just remember that fmask (also, umask and dmask) in fstab are the permissions you want to turn off.

As a slightly more interesting example, this would set the permissions to "rwx" for the owner, "rx" for the group, and "r" for everyone else:

/dev/hda1  /mnt/windows  ntfs-3g  defaults,exec,fmask=023  0  0