A user wants to set the permissions of a file to 'rwxr-xr--'. Which octal permission value should they use with chmod?
The symbolic mode rwxr-xr-- maps directly to octal 754: owner rwx equals 4+2+1=7, group r-x equals 4+0+1=5, and others r-- equals 4+0+0=4. Passing 754 to chmod therefore sets exactly the requested permission bits on the file.
Why this answer
The permissions 'rwxr-xr--' mean that the owner has read, write, and execute (rwx = 7), the group has read and execute (r-x = 5), and others have only read (r-- = 4). Therefore, the correct octal value is 754. Option A is correct.
Option B (755) gives others execute, option C (644) gives owner no execute and group no execute, and option D (744) gives group no execute.
Exam trap
Candidates often miscompute the octal digits by forgetting that each class (owner, group, others) is calculated independently. Common errors include picking 755 (adding execute for others) or 744 (forgetting group execute). The new option C (644) also shows a mistake where both owner and group execute are omitted.
How to eliminate wrong answers
Option B (755) is wrong because it sets others to r-x (5) instead of r-- (4), granting execute permission to others unnecessarily. Option D (744) is wrong because it sets group to r-- (4) instead of r-x (5), denying group execute permission. Option A and C are identical and both correct; the duplication is an artifact of the answer choices.