Courseiva
GNU and Unix Commands →mediumMultiple Choice

LPIC-1 GNU and Unix Commands Practice Question

Exhibit

0022

Refer to the exhibit. What will be the default permissions of a newly created file using the touch command?

⚠ Common exam trap

Many exam-takers confuse the base permissions (0666) with the final permissions, forgetting to apply the umask, or they mistakenly think touch sets execute bits like a directory creation would.

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

✓

-rw-r--r--

The `touch` command creates a file with default permissions determined by the current umask value. On most Linux systems, the default umask is 0022, which subtracts write permissions for group and others from the base permissions of 0666 (rw-rw-rw-), resulting in 0644 (rw-r--r--). Thus, option A is correct.

Answer analysis

Option-by-option breakdown

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

  • ✓

    -rw-r--r--

    Why this is correct

    A newly created file receives the base mode 666 masked by the umask. With the default umask 022, write permission for group and others is removed, leaving rw- for the owner and r-- for group and others, giving -rw-r--r--.

  • ✗

    -rw-rw-rw-

    Why it's wrong here

    The umask subtracts permissions from the base, so 666 minus a typical 022 umask yields 644, not 666. -rw-rw-rw- is tempting because it is the theoretical maximum for a file, but the exhibit's umask removes group and other write bits, producing -rw-r--r--.

  • ✗

    -rwxr-xr-x

    Why it's wrong here

    Execute bits are never assigned to newly created regular files by touch, regardless of umask, since the base mode for files is 666. -rwxr-xr-x is tempting because it is the standard directory default, but the exhibit's umask applied to 666 gives -rw-r--r--.

  • ✗

    -rw-rw-r--

    Why it's wrong here

    The umask strips group and other write bits, so a default file lands at -rw-r--r--, not -rw-rw-r--. A umask of 002 would yield this result, which is why it tempts; however, the exhibit's umask value removes write permission for group and others, making this mode impossible.

About these practice questions

This LPIC-1 question is part of Courseiva's 402-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-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.