Today I took LPIC 101-500 exam and I passed but one question keeps bothering me. The question was:
Given the following permissions -rw-r----- what umask should be applied to make all files have the same permissions? My reasoning is as follows (please correct me if I'm wrong):
- indicates that this is a regular file
r - 4
w - 2
- - 0
r - 4
- - 0
- - 0
- - 0
- - 0
- - 0
which gives 640 permissions.
Now, I know that umask is essentially an inverse of permissions so this comes down to the following equation:
777
-640
-----
137
So my answer would be 137, however there was no answer that included this result and I probably got this answer wrong. What am I missing?