Sample Header Ad - 728x90

How was the formula for calculating umask derived?

1 vote
0 answers
67 views
When using umask, I know that to get the resulting permission, the mask is first NOTed and then it is ANDed with the default permission (777 or 666). Now my question is, how was this formula derived? I mean, if **U** is the mask, **D** is the default permission, and **R** is the resulting permission, then where did R = D AND NOT(U) come from? It's not like someone has just thought of it out of nowhere.
Asked by JLC (327 rep)
Mar 17, 2024, 07:36 AM