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

16 comments
Sign in to comment
anhcqOption: B
Nov 13, 2021

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

MalicaideOption: B
Jul 8, 2020

Answer is B. 0027

minajahan
Jun 12, 2020

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

Tewodros89Option: B
Sep 16, 2023

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
Oct 25, 2023

excellent explanation

McLabaOption: B
Apr 2, 2021

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

armandolubabaOption: B
Jan 5, 2023

B is correct

Dlm17Option: B
Apr 18, 2023

B is the answer

CuriousLinuxCatOption: B
Jul 24, 2021

Agreed, answer is B. 0027.

iwkno6Option: B
Jul 29, 2021

Agreed 0027

LazylinuxOption: B
Jan 19, 2022

IS correct

FantaColaOption: B
Feb 9, 2022

B. 0027

eriksealsOption: B
Jun 8, 2022

B. 0027

HelgaLee
Sep 2, 2022

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

Jubal75Option: B
Mar 3, 2023

I say B

asssssaOption: B
Apr 2, 2024

i don't know why b

janotijrOption: B
May 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