git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@osdl.org>
To: Junio C Hamano <junkio@cox.net>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: Default "tar" umask..
Date: Fri, 5 Jan 2007 13:40:38 -0800 (PST)	[thread overview]
Message-ID: <Pine.LNX.4.64.0701051336000.3661@woody.osdl.org> (raw)
In-Reply-To: <7vzm8xdw3t.fsf@assigned-by-dhcp.cox.net>



On Fri, 5 Jan 2007, Junio C Hamano wrote:
> >
> > Yes, using 002 is tempting.  But it's got the same "looseness" problems
> > as 000, only on a smaller scaler: there are certainly situations where a
> > user doesn't want to share write permissions with all the members of her
> > current group.  If we change the default, let's go all the way to 022.
> 
> I don't think the above argument makes much sense -- it does not
> explain why you do not go "all the way" to 077.

I really think that 022 is the right choice, for a very simple reason: 
peoples expectations. It's just _common_.

> 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. 

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.

Which is why 022 is the historical default for umask. 

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.

		Linus

  reply	other threads:[~2007-01-05 21:40 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-30 18:45 Default "tar" umask Linus Torvalds
2006-12-30 19:27 ` Junio C Hamano
2007-01-05 20:39   ` René Scharfe
2007-01-05 21:03     ` Junio C Hamano
2007-01-05 21:40       ` Linus Torvalds [this message]
2007-01-05 22:15         ` Junio C Hamano
2007-01-07 15:20           ` Krzysztof Halasa
2007-01-07 21:28             ` Junio C Hamano
2007-01-05 22:30       ` René Scharfe
2007-01-05 22:40         ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.64.0701051336000.3661@woody.osdl.org \
    --to=torvalds@osdl.org \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).