Courseiva
Devices, Filesystems and FHShardMultiple ChoiceObjective-mapped

LPIC-1 Devices, Filesystems and FHS Practice Question

Exhibit

$ ls -la /usr/local/bin/myapp
-rwsr-xr-x 1 root root 12345 Jan 1 00:00 /usr/local/bin/myapp
$ sudo -u user1 /usr/local/bin/myapp
Error: Permission denied
$ id user1
uid=1001(user1) gid=1001(user1) groups=1001(user1)
$ getfacl /usr/local/bin/myapp
# file: usr/local/bin/myapp
# owner: root
# group: root
user::rwx
group::r-x
other::r-x

Refer to the exhibit. A user 'user1' tries to run the setuid binary 'myapp' but gets permission denied. What is the most likely reason?

⚠ Common exam trap

The trap here is that candidates often focus on file permissions (e.g., missing execute bit or group membership) and overlook the filesystem mount option 'nosuid', which silently disables setuid/setgid behavior regardless of the binary's permission bits.

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 binary has the setuid bit set, but the filesystem is mounted with 'nosuid'

When a filesystem is mounted with the 'nosuid' option, the kernel ignores setuid and setgid bits on executables within that filesystem. Even if 'myapp' has the setuid bit set, the nosuid mount flag prevents the effective UID from changing to the file owner, so 'user1' still runs the binary with their own privileges and may receive 'Permission denied' if the binary requires root-level access.

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 binary is missing the setgid bit

    Why it's wrong here

    Missing setgid does not cause permission denied; it just doesn't set group.

  • The binary is not executable by others

    Why it's wrong here

    The permissions show r-x for others, so user1 has execute permission.

  • The binary has the setuid bit set, but the filesystem is mounted with 'nosuid'

    Why this is correct

    If the filesystem is mounted with 'nosuid', setuid bits are ignored, so the program runs with the user's privileges, and the error might be due to insufficient permissions for the operation.

  • The user does not belong to the root group

    Why it's wrong here

    The setuid bit elevates to owner (root), so group membership is not required for execution.

About these practice questions

Courseiva writes every LPIC-1 question from scratch — 527 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or 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-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.