Controlling Default Permissions: umask Flashcards Preview

Networking > Controlling Default Permissions: umask > Flashcards

Flashcards in Controlling Default Permissions: umask Deck (14):

At the kernel level, Linux creates files with...?

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


At the kernel level, Linux creates directories with...?

a default mode of 777 (rwxrwxrwx)


Every process possesses a "umask" parameter which ...?

masks out certain of these default permissions.


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



The bash shell's umask is modified with the ...?

umask command.


Newly created files have a default mode of...?

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


Newly created directories have a default mode of...?

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


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



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

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


The octal number is referred to as the process's "umask". The umask is composed just like...?

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.


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

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.


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

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.


The umask of the bash shell can be examined and modified by 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.


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...?

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.