Courseiva
System SecuritymediumMultiple ChoiceObjective-mapped

LPIC-2 System Security Practice Question

An application running under AppArmor is failing to write to its log directory. The AppArmor profile for the application includes the line '/var/log/myapp/ r,' but not '/var/log/myapp/** rw,'. What is the most likely issue?

⚠ Common exam trap

Many candidates think the 'r' permission on a directory implies write access to files within it, but AppArmor requires explicit recursive rules with 'w' for file creation and modification.

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 'r' permission only allows read, but write is required.

The AppArmor profile line '/var/log/myapp/ r,' grants only read permission on the directory itself, not write access to files within it. To allow writing to files in the directory, the profile must include a rule like '/var/log/myapp/** rw,' which grants read and write permissions recursively. Without write permission, the application cannot create or modify log files, causing the failure.

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 directory itself is not created, and AppArmor prevents creation.

    Why it's wrong here

    AppArmor does not typically prevent directory creation if the parent directory is writable; the profile is for access checks.

  • The 'r' permission only allows read, but write is required.

    Why this is correct

    The profile grants read access to the directory, but write access to files requires rw permissions on the directory contents.

  • The AppArmor service is not running, so the profile is not enforced.

    Why it's wrong here

    If the service were not running, there would be no restriction; the issue is profile-based.

  • The profile needs 'ix' instead of 'r' for execute rights.

    Why it's wrong here

    Execute permissions are unrelated to writing logs.

About these practice questions

This LPIC-2 question is part of Courseiva's 507-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This LPIC-2 practice question is part of Courseiva's free LPI 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 LPIC-2 exam.