Fmask
Encyclopedia
Fmask is a unix
Unix
Unix is a multitasking, multi-user computer operating system originally developed in 1969 by a group of AT&T employees at Bell Labs, including Ken Thompson, Dennis Ritchie, Brian Kernighan, Douglas McIlroy, and Joe Ossanna...

command.

The following is copy pasted from 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.

Examples

The following is an example of a user's /etc/fstab file.
# /etc/fstab: static file system information.
#
/dev/hda1 /media/win ntfs rw,suid,dev,exec,auto,user,async,fmask=113,dmask=002,gid=46 0 1
/dev/hda2 /media/big vfat rw,suid,dev,exec,auto,user,async,fmask=113,dmask=002,gid=46,utf8 0 1
/dev/hdb1 /media/old vfat rw,suid,dev,exec,auto,user,async,fmask=113,dmask=002,gid=46,utf8 0 1

Directories (ie dmask=002)

Owner Group Other
Directories have attributes r w x r w x r w x
Permissions preset 1 1 1 1 1 1 1 1 1 (7778)
dmask (do NOT pass preset bit(s)) 0 0 0 0 0 0 0 1 0 (0028)
------- ------- -------
Result 1 1 1 1 1 1 1 0 1 (7758)
For Directories r w x r w x r - x

Files (ie: fmask=113)

Owner Group Other
Files have attributes r w x r w x r w x
Permissions preset 1 1 1 1 1 1 1 1 1 (7778) (6668) for some systems
fmask (do NOT pass preset bit(s)) 0 0 1 0 0 1 0 1 1 (1138)
------- ------- -------
Result 1 1 0 1 1 0 1 0 0 (6648)
For Files r w - r w - r - -

Both Files and Directories (ie: umask=003)

Owner Group Other
Files & Directories have attributes r w x r w x r w x
Permissions preset 1 1 1 1 1 1 1 1 1 (7778)
umask (do NOT pass preset bit(s)) 0 0 0 0 0 0 0 1 1 (0038)
------- ------- -------
Result 1 1 1 1 1 1 1 0 0 (7748)
For Files or Directories r w x r w x r - -
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK