Controlling Default Permissions: umask Flashcards

1
Q

At the kernel level, Linux creates files with…?

A

a default mode of 666 (rw-rw-rw)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

At the kernel level, Linux creates directories with…?

A

a default mode of 777 (rwxrwxrwx)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Every process possesses a “umask” parameter which …?

A

masks out certain of these default permissions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

In Red Hat Enterprise Linux, the default umask for standard users is…?

A

002

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

The bash shell’s umask is modified with the …?

A

umask command.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Newly created files have a default mode of…?

A

664 (rw-rw-r–), implying that anyone can read, but only the file owner can modify, a newly created file.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Newly created directories have a default mode of…?

A

775 (rwxrwxr-x), implying that anyone can access or browse the directory, but only the directory owner can add or remove files.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

The default permissions of newly created files can be altered through a standard Unix concept called a….?

A

umask.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Every process, including the bash shell, has a …?

A

3 digit octal number which is used to “mask out” certain permissions when new files are created.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

The octal number is referred to as the process’s “umask”. The umask is composed just like…?

A

an octal mode, but the meaning is reversed. Like an octal mode, each access class is represented by a single digit: (u)ser owner is the “hundreds”, (g)roup owner the “tens”, and (o)ther the ones.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Like an octal mode, each permission has a value…?

A

4 for (r)ead, 2 for (w)rite, and 1 for e(x)ectue. Unlike octal modes, however, the umask is composed of the values of unwanted permissions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

In order to determine permissions for newly created files, the Linux kernel starts with…?

A

a global default mode of 666 (rw-rw-rw). The kernel then applies the umask for the process that created the file. Any values that are set in the u mask are “stripped’ from the default permissions of 666. For example a umask of 002 would result in default permissions of 664.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

The umask of the bash shell can be examined and modified by a …?

A

command called umask. When called without the arguments, the umask command reports the shell’s current umask. When called with an octal umask as a single argument, the shell’s umask is set to the specified value.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Blondie would like to create several files that can be viewed and modified by members of the group music, but that no one else can read or write. One approach would be to…?

A

create the files, and then change the file’s permissions with the chmod. Instead, blondie is going to use umask to change her shell’s default permissions on newly created files.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly