Linus Torvalds <torvalds@xxxxxxxx> writes: > On Fri, 5 Jan 2007, Junio C Hamano wrote: >> ... >> On the other hand, I can explain 002 fairly easily and >> consistently. > > No you can't. 002 makes no sense at all in a very common old-fashioned > setup with a "user" group. I do not think so (see below). > Maybe I'm old, and these days most setups seem to give people their own > group (so I'm "torvalds:torvalds" on all the machines I have access to), > but it used to be _very_ common to have just a "user" group that all > normal users were part of (or have the default gid depend on something > like which department you are in). > > In that situation, 002 is really effectively no different at all from 000. I remember those days. People had 022 umask for that exact reason, as you said, in such a setup. It was quite common. On the other hand, modern setups often use "own" group and people often use 002 umask. If you extract as a normal user (i.e. without -p) then 002 is really effectively no different at all from 000 because umask kicks in and give the results the user would expect in either setups, which is good. In "user" group setup, umask 022 makes files to 0644, in "own" group setup, umask 002 makes files to 0664. All is good. If the archive is made with 022, that would break expectation of users whose umask is 002 (a sane value in modern "own" group setups). The current 000 was bad for users who work as root and do not know about implied -p (which is not their fault). When extracting as root, the files and directories are owned by 'root' and its group. Even in the old "user" group setups, I _thought_ the root was in his own group or wheel in BSD, and the group was not shared with Joe Random users, so if that is the case, group writability is not an problem. In the modern "own" group setups, the root user is in its own his group 'root', so group writability is not an issue either. > 022 really is very easy to explain: "readability (and executability) is a > lot less dangerous than writability, and by default we only give > writability to the user". That's why we _don't_ commonly have 066 or 077 > as the umask, and also why 002 is the default umask ONLY on systems where > users have their own individual groups by default. 077 was a tongue-in-cheek comment. I think we are basing our reasoning with the same shared understanding of historical practice of "user" group. I wonder why the differenece in conclusions. Maybe my recollection of historical practice was faulty and the root shared its group with Joe Random users? If so, I would agree that 002 makes no sense at all, as you said. - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html