mounting ntsf drive in fstab , unsure of fmask and dmask values
Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I found the following text quite informative, I take no responsability for it and unfortunately, can not remember from where it came.
Code:
fmask, dmask, and umask taken together pertain only to Windows filetypes ( NTFS and FAT32 ) whereas umask alone pertains to both windows and Linux filetypes but are implemented 2 different ways.
On Linux Filesystems
At the moment of birth every file has permissions of 666 and every directory has permissions of 777. A system wide umask is created to modify these permissions immediately after birth and it's currently set at 002. So when you create a new file it's permissions are:
666
002 <-- minus the umask
==
664
And every new directory has permissions of:
777
002 <-- minus the umask
==
775
On Windows Filesystems
Windows fileystems have no Linux file permission attributes so a virtual filesystem is used to create a "view" to give them the appearance that they do have them. The system wide umask has no affect on these filesystems nor does a chmod or a chown. They can only be set when the "view" is created in fstab.
At the moment of birth NTFS files and folders start out with exactly the same permissions: 777. If you were to set up in fstab a umask of 002 for these partitions then the result would be different from a Linux filesystem:
File: 777 - 002 = 775
Folder: 777 - 002 = 775
The folder setting is fine and that's the way you want them to be but the files have all been made executable - every single one of them. You can change that by separating umask into it's constituent parts: fmask and dmask:
So if you set up fstab this way for an NTFS partition: dmask=002,fmask=113
File: 777 - 113 = 664
Folder: 777 - 002 = 775
All that said, I have opted for the folling line to be added to my fstab:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.