Mailinglist Archive: opensuse (3397 mails)
| < Previous | Next > |
Re: [SLE] Alert
- From: Randall R Schulz <rschulz@xxxxxxxxx>
- Date: Wed, 27 Apr 2005 07:06:15 -0700
- Message-id: <200504270706.15794.rschulz@xxxxxxxxx>
Anders,
On Tuesday 26 April 2005 12:19, Anders Johansson wrote:
> On Tuesday 26 April 2005 21:01, Randall R Schulz wrote:
> > Ken,
> >
> > On Tuesday 26 April 2005 11:30, Ken Schneider wrote:
> > > > ...
> > >
> > > umask actually subtracts from what would be full access.
> >
> > Actually, it subtracts from the mode supplied by the program that
> > is issuing the system call to create the file.
>
> Or to be absolutely accurate, it doesn't subtract, it does a logical
> and between the desired permissions and the inversion of the umask
Actually, the term "subtract" _is_ appropriately used here.
A Unix file mode is not really a number, it a concise representation of
a set. We only use the numeric representation as a convenience (and we
don't always do that, often preferring a symbolic representation that
makes the set aspect a little more obvious).
Logicians and mathematicians define the notion of set subtraction. So in
this context, that sense of "subtract" is correct.
> if you have an umask of 222 and you try to create a file with mode
> 444, that doesn't give you (through subtraction) 222, it gives you
> 444 & 555 = 444.
Randall Schulz
On Tuesday 26 April 2005 12:19, Anders Johansson wrote:
> On Tuesday 26 April 2005 21:01, Randall R Schulz wrote:
> > Ken,
> >
> > On Tuesday 26 April 2005 11:30, Ken Schneider wrote:
> > > > ...
> > >
> > > umask actually subtracts from what would be full access.
> >
> > Actually, it subtracts from the mode supplied by the program that
> > is issuing the system call to create the file.
>
> Or to be absolutely accurate, it doesn't subtract, it does a logical
> and between the desired permissions and the inversion of the umask
Actually, the term "subtract" _is_ appropriately used here.
A Unix file mode is not really a number, it a concise representation of
a set. We only use the numeric representation as a convenience (and we
don't always do that, often preferring a symbolic representation that
makes the set aspect a little more obvious).
Logicians and mathematicians define the notion of set subtraction. So in
this context, that sense of "subtract" is correct.
> if you have an umask of 222 and you try to create a file with mode
> 444, that doesn't give you (through subtraction) 222, it gives you
> 444 & 555 = 444.
Randall Schulz
| < Previous | Next > |