Want to work with documents made in Windows but don't know how

Tim Chase blinux.list at thechases.com
Mon Dec 4 21:16:55 UTC 2006


>>    uid=1000,gid=1001,dmask=007,fmask=117
>
> What values are available for the dmask and umask options? I think the
> man pages were pretty unclear on this or maybe it was me who didn't look
> as far down as i should have... I thought the umask, dmask and fmask
> values were the same as those of Chmod that is 755 for rwxr-xr-x but i
> could be wrong.

You are correct, only they're the masks, not the actual values. 
The values are listed in octal, so to invert them, you should 
subtract each digit from 7.  So for your chmod example of "755", 
the mask would be 022 (7-7=0, 7-5=2, 7-5=2)

So the masks I'm using (007 and 117) would be the permissions 770 
and 660 (that's rwxrwx--- and r-xr-x--- respectively)

If you understand binary (like the sicko I am), you're just 
flipping all the bits, so 007 (which is 000000111 in binary) 
becomes octal 770 (which is 111111000) and my fmask of octal 117 
(which is 001001111 in binary) becomes 660 (which is 110110000 in 
binary).  If you're not a binary wonk, don't sweat it, but it can 
be helpful for lots of things.

The mask is the bits you *don't* want by default, rather than the 
chmod values which are the bits you *do* want.

-tim






More information about the Blinux-list mailing list