CompTIA
LX0-103 · Question #102
LX0-103 Question #102: Real Exam Question with Answer & Explanation
The correct answer is B: -rw-r--r-- 1 root root 531 Jun 5 22:45 /etc/passwd. The /etc/passwd file must be world-readable (permissions 644, owned by root) so all users and system processes can resolve account information.
Devices, Linux Filesystems, Filesystem Hierarchy Standard
Question
Select the line that BEST represents what permissions the /etc/passwd file should have.
Options
- A-rw------- 1 root root 531 Jun 5 22:45 /etc/passwd
- B-rw-r--r-- 1 root root 531 Jun 5 22:45 /etc/passwd
- C-rw-r--r-- 1 1 1 531 Jun 5 22:45 /etc/passwd
- DAll answers listed are not correct.
- EAll answers listed are correct.
Explanation
The /etc/passwd file must be world-readable (permissions 644, owned by root) so all users and system processes can resolve account information.
Common mistakes.
- A. Permissions -rw------- (600) restrict read access to root only, which breaks any non-root process or utility that needs to read user account entries from the file.
- C. Although the permission bits are correct, the ownership fields display the numeric values '1 1' instead of the named account 'root root', indicating the file is not owned by the root user as required by convention and security policy.
- D. This is incorrect because option B accurately represents the expected permissions and ownership for /etc/passwd.
- E. Not all options are correct - options A and C each contain a distinct error in either permissions or ownership, so they cannot all be simultaneously correct.
Concept tested. Linux /etc/passwd correct file permissions and ownership
Reference. https://man7.org/linux/man-pages/man5/passwd.5.html
Topics
#file permissions#passwd file#security#rwx bits
Community Discussion
No community discussion yet for this question.