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