In Unix, files can be protected by assigning each one a 9-bit mode called right bits. Now, consider the following two statements : I. A mode of 641 (octal)…
In Unix, files can be protected by assigning each one a 9-bit mode called right bits. Now, consider the following two statements : I. A mode of 641 (octal) means that the owner can read and write the file, other members of the owner's group can read it, and users can execute only. II. A mode of 100 (octal) allows the owner to execute the file, but prohibits all other access. Which of the following options is correct with reference to above statements?
Show answerHide answer
Correct answer: (C) Both I and II are correct
Explanation
In UNIX, file access permissions are given as three octal digits: the first for the owner, the second for the group, the third for others. Each digit is rwx: 7 = rwx, 6 = rw-, 5 = r-x, 4 = r--, 3 = -wx, 2 = -w-, 1 = --x, 0 = none. 641 → owner can read and write, group members can read, others can execute only. 100 → owner can execute; all other access is prohibited. So both statements are correct.