Question 432 of 527
Essential ToolsmediumMultiple ChoiceObjective-mapped

Quick Answer

The answer is to run `chown john:john /home/john` because the "could not chdir to home directory fix" requires correcting ownership, not the directory's existence. Even though `/home/john` is present, the SSH login process cannot change into it if the directory is not owned by the user john, as the system enforces permission checks based on ownership. On the Red Hat Certified System Administrator EX200 exam, this scenario tests your understanding of file permissions and the `/etc/passwd` structure—a common trap is assuming the error means the directory is missing, when in fact it exists but lacks proper ownership. Remember that the home directory must be owned by the user and their primary group for the login shell to `chdir` successfully. A quick memory tip: "Own it to enter it"—if the user doesn't own the directory, they can't step inside.

EX200 Essential Tools Practice Question

This EX200 practice question tests your understanding of essential tools. The scenario asks you to isolate a root cause — eliminate options that address a different problem before choosing. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

You are a Linux administrator. A user reports that when they log in via SSH, they see the message 'Could not chdir to home directory /home/john: No such file or directory' and are dropped into the root directory. The user's home directory does exist at /home/john but is empty. The user's entry in /etc/passwd is: 'john:x:1001:1001::/home/john:/bin/bash'. What is the most likely cause and the correct fix?

Clue words in this question

Noticing these words before you look at the options changes how you read each choice.

  • Clue: "most likely"

    Why it matters: Probability qualifier — the question wants the most probable cause or outcome, not a guaranteed one. Eliminate low-probability options.

Question 1mediummultiple choice
Full question →

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

The home directory is not owned by john. Run chown john:john /home/john.

The error 'Could not chdir to home directory /home/john: No such file or directory' occurs even though the directory exists, because the SSH daemon (or login process) cannot access it. The most likely cause is that the home directory is not owned by the user john, so the system denies permission to change into it. Running 'chown john:john /home/john' corrects the ownership, allowing the user to enter their home directory.

Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • The home directory path in /etc/passwd has a typo. Change it to /home/john.

    Why it's wrong here

    Path is correct.

  • The home directory is not owned by john. Run chown john:john /home/john.

    Why this is correct

    Correct ownership solves permission issue.

    Clue confirmation

    The clue word "most likely" in the question point toward this answer.

    Related concept

    Read the scenario before looking for a memorised answer.

  • The home directory is missing the .bashrc file. Copy default files from /etc/skel.

    Why it's wrong here

    Missing files would not cause 'No such file or directory'.

  • The user's shell is invalid. Change shell to /bin/bash.

    Why it's wrong here

    Shell is already /bin/bash.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates focus on the literal 'No such file or directory' message and assume the directory is missing or misconfigured, rather than recognizing that permission errors (due to incorrect ownership) can produce the same misleading message.

Detailed technical explanation

How to think about this question

When a user logs in via SSH, the login process (e.g., sshd or login) attempts to change to the user's home directory using chdir(). If the directory exists but is not owned by the user, the kernel's permission check fails (EACCES), and the system falls back to the root directory (/). The 'No such file or directory' message is misleading because the error is actually about permission, not existence; this is a common behavior in some Linux distributions where the error message is not precise.

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Real-world example

How this comes up in practice

A small business has 20 workstations on the 192.168.1.0/24 network and one public IP from its ISP. The router uses PAT (NAT overload) so all 20 devices share one public address using different source ports. NAT questions test whether you understand the four address terms and which direction each translation applies.

What to study next

Got this wrong? Here's your next step.

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Related practice questions

Related EX200 practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free EX200 practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this EX200 question test?

Essential Tools — This question tests Essential Tools — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: The home directory is not owned by john. Run chown john:john /home/john. — The error 'Could not chdir to home directory /home/john: No such file or directory' occurs even though the directory exists, because the SSH daemon (or login process) cannot access it. The most likely cause is that the home directory is not owned by the user john, so the system denies permission to change into it. Running 'chown john:john /home/john' corrects the ownership, allowing the user to enter their home directory.

What should I do if I get this EX200 question wrong?

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Are there clue words in this question I should notice?

Yes — watch for: "most likely". Probability qualifier — the question wants the most probable cause or outcome, not a guaranteed one. Eliminate low-probability options.

What is the key concept behind this question?

Read the scenario before looking for a memorised answer.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Keep practising

More EX200 practice questions

Last reviewed: Jun 11, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

This EX200 practice question is part of Courseiva's free Red Hat certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the EX200 exam.