Answers:
fmask并dmask有mount选择的FAT文件系统的基础上fstab。
它们用于定义权限(umask将它们设置为文件和目录,而fmask仅适用于文件和dmask目录)。
掩码不是文件的权限,它们用于获取所需的权限。此外,掩码不能添加任何权限,它们仅限制文件或目录可以具有的权限。
该umask是对文件和文件夹的默认值,如果你想定制文件和文件夹的权限,你应该使用fmask与dmask相同用途的umask。
掩码权限与传递给chmod命令的八进制权限代码不同,但是该表对于理解掩码权限的工作原理非常有帮助:
0 1 2 3 4 5 6 7
r + + + + - - - -
w + + - - + + - -
x + - + - + - + -
它用作普通的八进制权限,但从7中减去,并使用绝对值。例如,如果要设置权限,0777则需要0000在umask(例如umask=0000)中进行设置,如果要设置为0755,则将其设置为0022:
(来源)
man mount 给这个:
umask=value
Set the umask (the bitmask of the permissions that are not
present). The default is the umask of the current process. The
value is given in octal.
dmask=value
Set the umask applied to directories only. The default is the
umask of the current process. The value is given in octal.
fmask=value
Set the umask applied to regular files only. The default is the
umask of the current process. The value is given in octal.