How can I mount a Windows partition so that the files within it don't have execution permission? I mount a Windows partition using:

sudo mount /dev/sda3 win

win is a folder in my home dir.

This of course works. But files in the mounted partition are given execute permission, or to be specific, 777.

How to mount the partition so that files are given 666 or other permission?


man mount has a section "Mount options for ntfs" (assuming your file system is NTFS and not FAT) where it says,

uid=value, gid=value and umask=value

Set the file permission on the filesystem. The umask value is given in octal. By default, the files are owned by root and not readable by some‐body else.

sudo mount /dev/sda3 win/ -o fmask=111 will mount the ntfs file system with all files having rw-rw-rw- permissions.

Directories will still be executable, but this is needed to allow you to cd into them.

  • Thanks for the umask options. But I think fmask=111 should be used instead, cause umask=111 would make the directories non-executable so that I could not cd into it. For me, fmask=111 does the job. – gongzhitaao Aug 4 '12 at 10:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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