Question 53Asked in UGC NET Computer Science, June 2016 (Paper II & III, Selected Questions)

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?
  1. AOnly I is correct
  2. BOnly II is correct
  3. CBoth I and II are correct
  4. DBoth I and II are incorrect
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.

From UGC NET Computer Science PYQ, June 2016 (Paper II & III, Selected Questions)

This is question 53 of UGC NET Computer Science PYQ, June 2016 (Paper II & III, Selected Questions). See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.