easyMultiple Choice
XK0-006 Practice Question: A system administrator wants to ensure that the…
A system administrator wants to ensure that the /tmp directory is mounted with noexec to prevent code execution from temporary files. Which file should be modified to persist this across reboots?
⚠ Common exam trap
Many candidates confuse /etc/mtab (a runtime snapshot) with /etc/fstab (the persistent configuration file), or think that modifying /etc/mtab will make changes permanent, when in fact it is overwritten on every mount event.
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
✓
/etc/fstab
The /etc/fstab file is the system configuration file that defines how disk partitions, block devices, and remote filesystems are mounted at boot time. Adding the noexec mount option to the /tmp entry in /etc/fstab ensures that the /tmp directory is mounted with the noexec flag persistently across reboots, preventing execution of binaries from temporary files.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
/etc/mtab
Why it's wrong here
/etc/mtab is a kernel-generated snapshot of currently mounted filesystems, rewritten at every mount and boot, so edits there are discarded and never persist. It is tempting because it lists mount options, and it would be the correct file to read when auditing whether /tmp is presently mounted with noexec.
- ✓
/etc/fstab
Why this is correct
Editing /etc/fstab adds the noexec mount option to the /tmp entry, so systemd applies it automatically at every boot. This satisfies the requirement to persist the setting across reboots, unlike a one-off mount command, which would be lost on restart.
- ✗
/etc/sysconfig/network
Why it's wrong here
/etc/sysconfig/network configures hostname and routing, not filesystem mount options, so editing it leaves /tmp executable after reboot. It is tempting because it is a persistent system configuration file, and it would be the right place for network settings such as a static gateway or hostname.
- ✗
/etc/security/limits.conf
Why it's wrong here
/etc/security/limits.conf sets user resource limits such as file descriptors and processes; it does not define mount options. It would be correct when restricting per-user resource consumption, whereas /etc/fstab is modified to persist noexec on /tmp across reboots.
Go deeper
Related to this question
Learn chapter
File Transfer and Remote Access
Key term
fstab
fstab is a system configuration file in Linux that defines how and where storage devices and partitions are mounted at boot time.
Key term
System Configuration
System Configuration refers to the specific combination of hardware components, software settings, and operating system parameters that determine how a computer behaves and performs.
About these practice questions
One of 781 original XK0-006 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This XK0-006 practice question is part of Courseiva's free CompTIA 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 XK0-006 exam.