Ovid writes: > --- On Tue, 23/9/08, Shlomi Fish <[EMAIL PROTECTED]> wrote: > > > The default Mandriva umask appears to be 0002 . > > That surprised me
In general 0002 (aka u=rwx,g=rwx,o=rx) is the right choice of umask on a sytem where each user has their own group -- that is, where the user ovid has a default group of ovid (which doesn't have any other members). So files by default are created as ovid:ovid rw-rw-r--, and nobody but ovid can write to them. The each-user-has-a-private-group set-up is quite common. It facilitates having shared directories which members of a group can all write to. For example, if a group of developers are all in the dev group then root could create a directory that is root:dev rwxrwsr-x. A umask of 0002 means any files you create in that directory will be ovid:dev rw-rw-r-- (or rwxrwxr-x, if appropriate), so all members of the group can write to them, as intended. Whereas a umask of 0022 would leave the files not group-writeable, so you would have to specifically chmod them each time. That's irritating. Having 0002 is more convenient, and, so long as your default group is one with only you in it, not a security risk. Smylers