Slackware - InstallationThis forum is for the discussion of installation issues with Slackware.
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'm running Slackware64 15
I do not understand what the fmask and dmask are doing
the doc I have found says
"fmask=177,dmask=077" "Root has read/write access, users have no access (ntfs-3g)"
"fmask=333,dmask=222" "Everyone has read only access (built-in kernel ntfs driver)"
"fmask=133,dmask=022" "Everyone has read access, but only root can write (ntfs-3g)"
"fmask=111,dmask=000" "All users can read/write to any file (ntfs-3g)" .
my fstab was
/dev/nvme0n1p3 /mnt/ntfs-c ntfs3 fmask=333,dmask=222,uid=500,gid=500 1 0
and yet as root I can still use mkdir on the ntfs partition ?
the mount command says
/dev/nvme0n1p3 on /mnt/ntfs-c type ntfs3 (rw,relatime,uid=500,gid=500,fmask=37777600333,dmask=37777600222,iocharset=utf8)
these mask numbers look strange ?
if I change my fstab to
/dev/nvme0n1p3 /mnt/ntfs-c ntfs3 ro,fmask=333,dmask=222,uid=500,gid=500 1 0
I cannot do mkdir on the ntfs partition as expected
so why does fmask=333 and dmask=222 not prevent root from writing into the NTFS partition ?
I tried fmask=133 and dmask=022 (which is what I want)
but ended up having to run chkdsk on the NTFS partition to repair it.
I had used dolphin to drag and drop some files and directories to the NTFS partition as a user by mistake.
Also the vfat defaults seem to be fmask=0022 and dmask=0022.
what does this mean ?
thanks
that explains what 0022 means.u=rwx,g=rx,o=rx
but not why my mount command shows strange fmask and dmask values
/dev/nvme0n1p3 on /mnt/ntfs-c type ntfs3 (rw,relatime,uid=500,gid=500,fmask=37777600333,dmask=37777600222,iocharset=utf8)
is the dmask/fmask suppose to be 3 digits or 4 digits long
I didn't like what was going on with fmask and dmask so I removed them from fstab
my fstab now looks like this
/dev/nvme0n1p3 /mnt/ntfs-c ntfs3 ro,uid=500,gid=500 1 0
my mount command now shows this
/dev/nvme0n1p3 on /mnt/ntfs-c type ntfs3 (ro,relatime,uid=500,gid=500,iocharset=utf8)
using a usb stick to move files from slackware to windows isn't a big deal for me.
Original Kernel level support for NTFS was contributed into a Linux Kernel back in 2001 and is very limited in functionality, especially write-support. Till now, NTFS-3G was the de facto way to enable NTFS in Linux. However, NTFS-3G is a filesystem in userspace (FUSE). The main drawback of this implementation is performance. On the contrary, NTFS3 is a kernel NTFS implementation, which offers much faster performance than FUSE based implementations.
thanks
that explains what is going on with NTFS3
only thing not explained is why
when my fstab was
/dev/nvme0n1p3 /mnt/ntfs-c ntfs3 fmask=333,dmask=222 1 0 (this should be read only)
the mount command shows
/dev/nvme0n1p3 on /mnt/ntfs-c type ntfs3 (rw,relatime,fmask=37777600333,dmask=37777600222,iocharset=utf8)
where did those strange fmask and dmask numbers come from ?
and as root I was still able to use mkdir on the ntfs partition ?
At least you are not the only one seeing these "3777760" prefixes before your fmask and dmask values.
If you search for "dmask 37777600022" which is a more normal value for a dmask (0022 meaning writable for the owner), you'll find several discussions involving multiple Linux distributions. And no explanation to be found.
OK
so the funny numbers are only a display problem (we think)
but
dev/nvme0n1p3 /mnt/ntfs-c ntfs3 fmask=333,dmask=222 1 0
"fmask=333,dmask=222" "Everyone has read only access (built-in kernel ntfs driver)"
as root I was still able to use mkdir on the ntfs partition ?
is root not part of "Everyone" ?
no, root has special rights. But anyway umask does not restrict users, just modifies the permissions (see the man page I sent): the mask acts as a last-stage filter that strips away permissions as a file (or dir) is created
looking at the NTFS3 manual it says
umask Controls the default permissions for files/directories created after the NTFS volume is mounted
so my concept of what these masks do is completely wrong.
I believe I got this misconception from the wording in the Slackware install.
I'm not going to run the install again but what I remember I was given several choices
on how to mount the NTFS on my machine . I was under the impression it had to do with restricting users.
No wonder I messed up my NTFS.
Thanks
I figured out what happened to my NTFS
if I remove the line
/dev/nvme0n1p3 /mnt/ntfs-c ntfs3 fmask=133,dmask=022 1 0
from fstab and reboot I get
bash-5.1$ pwd
/mnt
ls -l
drwxr-xr-x 2 root root 4096 Feb 27 06:51 ntfs-c
which is great
if I put the line
/dev/nvme0n1p3 /mnt/ntfs-c ntfs3 fmask=133,dmask=022 1 0
back in I get
bash-5.1$ pwd
/mnt
ls -l
drwxrwxrwx 1 root root 8192 Apr 10 12:31 ntfs-c
this is bad news
the root of my NTFS partition is wide open
not sure how to fix this so i'm going back mounting it read only.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.