Re: Making a vfat partition writeable by all in `users' group?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 22 Apr 2003 11:24:17 +0100, D. D. Brierton wrote:

> > /dev/hda6  /mnt/shared  vfat  users,quiet,gid=users,umask=007,noexec  0 0
> 
> Thank you Michael! That was exactly what I was looking for. Can you
> explain the octal values the umask, fmask and dmask take? They seem to
> be kind of the reverse of what you would give as an argument to chmod.
> (I mean I know that 4 is read, 2 is write and 1 is execute, but why does
> umask=007 have the same effect as chmod 770? That was what was throwing
> me.)

It is a _mask_, hence it's name. Think of "umask" as a bitmask of
the permission bits you want to _erase_.

It is the same as the "umask" that is applied when you use "chmod",
a boolean operation

  file_permissions = (NOT umask) AND chmod_value  

where "chmod_value" is either the value you specify upon changing
the permissions of a file or the value that is stored for the file.

The FAT filesystems do not have as many permission bits as the
ext2/ext3 filesystems. Upon mounting a VFAT partition, a compatible
permissions value is constructed from the few FAT permissions bits
and all bits specified in your umask value are erased. For the
most files, the constructed default value is 0777 (rwxrwxrwx),
so an umask=0007 masks "world/other" bits and the result becomes
0770.   [ (NOT 0007) AND 0777 = 0770 AND 0777 = 0770 ]

I haven't tried dmask/fmask yet. The manual says they work with a
2.5.x kernel. But they look useful. 

- -- 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE+pVOr0iMVcrivHFQRAkjqAJ9S0k7Lcqqm4+Ynn2T5w9+nCUoJDgCfavRW
AI2U03ERw/ZCrmAifPgJK+c=
=ubx+
-----END PGP SIGNATURE-----





[Index of Archives]     [Fedora Users]     [Centos Users]     [Kernel Development]     [Red Hat Install]     [Red Hat Watch]     [Red Hat Development]     [Red Hat Phoebe Beta]     [Yosemite Forum]     [Fedora Discussion]     [Gimp]     [Stuff]     [Yosemite News]

  Powered by Linux