101-500 Exam QuestionsBrowse all questions from this exam

101-500 Exam - Question 2


Which umask value ensures that new directories can be read, written and listed by their owning user, read and listed by their owning group and are not accessible at all for everyone else?

Show Answer
Correct Answer: B

The umask value determines the default permissions for newly created directories and files. The value 0027 means: the first digit (0) is usually ignored and indicates that the value is in octal form. The second digit (0) subtracts no permissions from the user (owner). The third digit (2) subtracts write permissions from the group, leaving read and execute permissions. The fourth digit (7) subtracts read, write, and execute permissions from others. This results in permissions of 750 for new directories, which means the owner can read, write, and execute; the group can read and execute; and others have no access. This matches the requirement of directories being readable, writable, and listable by the owning user, readable and listable by the owning group, and not accessible at all by everyone else.

Discussion

15 comments
Sign in to comment
anhcq
May 13, 2022

written and listed by their owning user => 7 => umask 0 read and listed by their owning group => 5 => umask 2 not accessible at all for everyone else => 0 => umask 7 => umask 0027, answer is B

Malicaide
Jan 8, 2021

Answer is B. 0027

Tewodros89
Mar 16, 2024

Answer is B. 0027 The leading '0' means we're specifying the umask in octal (base 8). The '2' in the first position subtracts write permissions for "others" (everyone else). The '7' in the second position subtracts read, write, and execute permissions for the group. The '2' in the third position subtracts write permission for the user.

hello2022
Apr 25, 2024

excellent explanation

minajahan
Dec 12, 2020

https://www.cyberciti.biz/tips/understanding-linux-unix-umask-value-usage.html

McLaba
Oct 2, 2021

Mask (Numeric Notation) 137 Allowed Permissions rw-r----- https://wintelguy.com/umask-calc.pl

armandolubaba
Jul 5, 2023

B is correct

Dlm17Option: B
Oct 18, 2023

B is the answer

LazylinuxOption: B
Jul 19, 2022

IS correct

FantaColaOption: B
Aug 9, 2022

B. 0027

erikseals
Dec 9, 2022

B. 0027

HelgaLee
Mar 2, 2023

I think this schema would be more easy to get about umask https://en.wikipedia.org/wiki/Umask

Jubal75Option: B
Sep 3, 2023

I say B

asssssa
Oct 2, 2024

i don't know why b

janotijr
Nov 28, 2024

777 for directories 666 for files written and listed by their owning user => 7 read and listed by their owning group => 5 not accessible at all for everyone else => 0 777 - 750 = 027

Matt2914Option: B
Mar 16, 2025

750 - 777 = 027 yoooo