Exam XK0-006 Topic 1 Question 73 Discussion

Actual exam question for CompTIA's XK0-006 exam
Question #: 73
Topic #: 1
Which of the following commands sets all the directories ' permissions recursively in the user ' s home directory and makes them accessible only to the user?

Suggested Answer: B Vote an answer

The correct answer is B. find ~ -type d -exec chmod 700 {} ; because it recursively targets all directories within the current user's home directory and sets their permissions to 700, which restricts access exclusively to the owner.
In Linux permission notation, 700 means:
Owner: read (r), write (w), execute (x)
Group: no permissions
Others: no permissions
This ensures that only the user can access, modify, and traverse the directories, which is a common security requirement for protecting personal or sensitive data. The find ~ -type d portion ensures that only directories (not files) within the user's home directory are selected. The -exec chmod 700 {} ; part applies the permission change to each directory found.
Option A is incorrect because it applies permissions 777 (full access to everyone) and targets files across the entire filesystem, which is a major security risk.
Option C is incorrect because it sets permissions to 750, which still allows group access. Additionally, it targets all directories under /home, not just the current user's home directory.
Option D is incorrect because 755 allows read and execute permissions to group and others, meaning directories are not restricted to the user only.
From a Linux+ security perspective, properly managing file and directory permissions is critical to maintaining system confidentiality and integrity. Using chmod 700 ensures strict access control, and combining it with find allows administrators to efficiently enforce secure permissions across directory structures.

by Werner at Apr 17, 2026, 09:04 PM

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
Nick name: Submit Cancel
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

0
0
0
10