Courseiva

LPIC-1 Devices, Filesystems and FHS Practice Question

Exhibit

$ mount
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noexec,relatime)

Refer to the exhibit. An admin attempts to execute a shell script located in /tmp but gets 'Permission denied'. Which mount option is most likely causing this?

⚠ Common exam trap

Many exam-takers assume 'Permission denied' always means missing execute bits (chmod +x), when in fact the noexec mount option silently blocks execution even with correct permissions.

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

✓

noexec

The 'noexec' mount option prevents execution of any binary or script directly from the filesystem, regardless of file permissions. Since the script is in /tmp and the admin gets 'Permission denied' despite correct execute bits, the /tmp partition is likely mounted with noexec, which is a common security hardening practice.

Answer analysis

Option-by-option breakdown

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

  • ✗

    relatime

    Why it's wrong here

    relatime only controls when access timestamps are written to disk; it has no bearing on execute permission. It tempts because it is a common /etc/fstab option, so it appears in the same configuration context as the noexec option that actually blocks script execution.

  • ✓

    noexec

    Why this is correct

    The `noexec` mount option prevents execution of any binaries or scripts on that filesystem, directly causing the "Permission denied" error when running the script from /tmp. Since /tmp is frequently mounted with `noexec` for security hardening, this constraint matches the symptom precisely, whereas other options would produce different errors.

  • ✗

    nodev

    Why it's wrong here

    nodev only blocks device-file interpretation; it does not remove execute permission, so it cannot cause 'Permission denied' here. The likely culprit is noexec, which forbids executing binaries from that mount. nodev is tempting because /tmp hardening guides often list it, and it is correct when untrusted device nodes must be ignored.

  • ✗

    nosuid

    Why it's wrong here

    nosuid prevents set-user-ID and set-group-ID bits from taking effect; it does not strip execute permission from a script. It tempts because it is a recognised hardening option on /tmp, but noexec is the mount option that produces 'Permission denied' on execution.

About these practice questions

One of 402 original LPIC-1 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 →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This LPIC-1 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-1 exam.