Drill 23 ยท
AP Cybersecurity Drill 23: File Permissions for Confidential Reports is a practice drill. It contains 5 original questions created by Brian Stewart, a Barron's test prep author with over 20 years of tutoring experience.
A consultancy checks Linux file permissions on a server of confidential client reports against its access policy; this drill uses an invented company and original figures.
Esmoreld Consulting stores confidential client reports on a Linux file server. An administrator compares the current file permissions (Source 1) against the access policy (Source 2).
Source 1: current permissions (from ls -l)
| Permissions | Owner | Group | File |
|---|---|---|---|
| -rw-r----- | jpatel | analysts | client_a.txt |
| -rw-r--r-- | jpatel | analysts | client_b.txt |
| -rwxrwxrwx | jpatel | analysts | client_c.txt |
Source 2: access policy. Confidential reports must be readable and writable by the owner, readable by the analysts group, and give NO access to others.
Question 1. Reading Source 1, which file currently violates the policy by granting access to others?
Explanation: Choice D is correct. The last three characters are the others permissions: client_b.txt shows r-- (others can read) and client_c.txt shows rwx (others can read, write, and execute), so both grant access the policy forbids. Choice A is incorrect because client_a.txt ends in --- and correctly gives others nothing. Choice B is incorrect because matching owner and group names is irrelevant and client_b is not the only violator. Choice C is incorrect because two files clearly over-grant to others.
Question 2. In a permission string such as -rwxrwxrwx, the three permission groups read in which order?
Explanation: Choice C is correct. After the leading file-type character, permissions are read as owner, then group, then others, each as an rwx triad. Choice A is incorrect because owner comes first, not group, and the leading character marks file type, not an owner name. Choice B is incorrect because owner is the first triad, not the last. Choice D is incorrect because group, not others, is the middle triad.
Question 3. Which octal mode sets exactly the policy: owner read-write, group read, others none?
Explanation: Choice B is correct. Owner rw is 6, group r is 4, others none is 0, so 640 matches the policy exactly. Choice A is incorrect because 644 gives others read, which the policy forbids. Choice C is incorrect because 600 denies the group the read access the policy requires. Choice D is incorrect because 660 grants the group write, which the policy does not allow.
Question 4. Why does the current setting on client_c.txt create the most serious risk of the three?
Explanation: Choice A is correct. The rwx for others lets any account read, modify, and execute the confidential report, which threatens both confidentiality and integrity, the worst exposure of the three files. Choice B is incorrect because the file extension does not set permissions or imply executable code. Choice C is incorrect because single-owner files are normal and required by the policy. Choice D is incorrect because group read is exactly what the policy intends and is not the source of the risk.
Question 5. What is the best fix that brings all three files into compliance while following least privilege?
Explanation: Choice D is correct. client_a.txt already meets the policy; setting the other two to 640 gives the owner read-write, the group read, and others nothing, which is the least privilege the policy specifies. Choice A is incorrect because 777 grants everyone full access, the opposite of least privilege. Choice B is incorrect because renaming files does not change their permission bits, so the over-grants remain. Choice C is incorrect because two files still violate the policy and must be fixed.