Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have edited my /etc/fstab file to include this line:

/dev/sda5 /media/yannbane/Shared ntfs defaults,umask=007,gid=46 0 0

I did this so my dev/sda5 partition (labeled Shared) is automatically mounted on system startup.

However, when I navigate to /media/yannbane/Shared, and search for some files - all of them are marked green (executable as per my l, which is an alias of ls -CF).

enter image description here

You can see that png files, js files, txt files, html files, css files, save files - everything, is marked as executable.

Why is this so? Do I need to change some fstab settings?

I am using Linux Mint w/ Cinnamon.

share|improve this question
up vote 3 down vote accepted

Change umask=007 to fmask=117 (or perhaps fmask=117,dmask=007). The umask option sets the permission bits to be removed from both files and directories, while fmask sets it for ordinary files and dmask sets it for directories. Since you specified 0 for both the owner and the group, that means that no permissions were removed for files or directories, so the execute permission was left intact for the owner and the group. Explicitly removing execute permissions on files by using 1 instead of 0 and fmask instead of umask will fix the problem. Execute permissions are normally included on directories, so you don't want to remove them.

share|improve this answer
OK, will do, but will this unable me from executing files I actually want to execute? – jcora Nov 29 '12 at 21:50
Yes; but you shouldn't be storing Linux executables on an NTFS volume, except perhaps as a temporary transfer measure. NTFS just wasn't designed with Unix/Linux-style permissions and ownership in mind and so is unsuitable for storing files that require those features. – Rod Smith Dec 1 '12 at 4:54
Oh OK. I won't be storing any executables there then. – jcora Dec 1 '12 at 14:08
But what if I need to store Linux executables there, because I use NTFS partition as a partition shared by Linux and Windows? I don't want all files to be executable (because they're mostly source code text files and resources which have to be seen by Windows and Linux). I only need the Linux executables (compiled from these sources on Linux) be marked as executable when seen by Linux (and only these files, no else) to be able to compile and run them from there without the need to copy to some other partition. Is there a way to do that? – SasQ Dec 8 '12 at 18:38
SasQ, your "need" to do something doesn't make it possible. I might need to get from Boston to Los Angeles in five minutes, but it isn't going to happen. That said, I recently heard of a possible solution. See for details. This is "bleeding-edge" software that might or might not work. It could end up trashing your whole disk. Personally, I wouldn't try it in a production environment. Instead, I'd find another way to accomplish my goals. – Rod Smith Dec 8 '12 at 20:03

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.