All mock tests are FREE till 31 December — register to save your progress

In UNIX, files are protected using a 9-bit permission mode ("rights bits"). Consider the statements: (I) A mode of 641 (octal) means the owner can read and write the file, other members of the owner's group can only read it, and all other users can only execute it. (II) A mode of 100 (octal) allows the owner to execute the file, but prohibits all other access. Which of the following is correct?

Pick an option to check yourself, or open the answer below.

Show answer & explanation

Correct answer: C. Both I and II are correct

Explanation

Decoding octal 641 digit by digit as owner/group/other: 6 = rw- (owner can read and write), 4 = r-- (group can only read), 1 = --x (others can only execute) — this matches statement I exactly. Decoding octal 100: 1 = --x (owner: execute only, no read/write), 0 = --- (group: no access), 0 = --- (others: no access) — the owner gets only execute permission and no one else is granted anything, matching statement II's claim that it allows only execution and prohibits all other access. Both octal-to-permission decodings check out, so both I and II are correct, option (iii).

More Database Management Systems questions