Chapter 14 Flashcards

1
Q

Every file has an associated blank and an associated blank.

A

owner
group

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

The security model for Linux is based on blank.

A

Unix

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

The blank number associates a file with an owner, whereas the blank number associates a file with a group.

A

UID
GID

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

As blank, you can change the owner of a file or reassign the group, but only to a group that the owner is part of.

A

root

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

What file manager can you run as root to change file permissions?

A

nautilus or GNOME Files

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

The command to change the ownership of a file in the preferred text-mode manner is blank

A

chown

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

When using chown, what do you have to include to signify a change to the group

A

owner:group

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

What command allows you to change the group without changing the owner?

A

chgrp

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

What option can you use with chown or chgrp to change the ownership of all the files in the same directory tree?

A

-R or –recursive

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

What command (and option) should you use to see a file’s permissions?

A

ls -l

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

The ls -l command returns what 7 columns

A

1) File permissions
2) Number of Links
3) Username
4) Group Name
5) File Size
6) Time Stamp
7) Filename

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

The first character in the file permission’s is the blank

A

The file type code

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

Which file type code is a normal data file?

A

-

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

Which file type code is a directory

A

d

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

Which file type code is a Symbolic link

A

l

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

Which file type code is a named pipe

A

p

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

Which file type code is a socket

A

s

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

Which file type code is a block device

A

b

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

Which file type code is a character device

A

c

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

What are the three types of file permissions?

A

Owner Permissions
Group Permissions
World (or Other) Permissions

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

In the three sets of permissions, what are the three types of access

A

read
write
execute

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

In a file permission string (after the file type code), what does the dash represent?

A

absence of a permission

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

What is the code for the ability to read a file?

A

r

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

What is the code for the ability to write a file?

A

w

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
What is the code for the ability to execute a file?
x
26
The other way to display file permissions is a blank
octal code
27
In octal code, what do you add to the starting permission of 0 to indicate the owner(or group or other) has permission to write a file
add 2
28
In octal code, what do you add to the starting permission of 0 to indicate the owner(or group or other) has permission to read a file
add 4
29
In octal code, what do you add to the starting permission of 0 to indicate the owner(or group or other) has permission to execute a file
add 1
30
The octal code is a blank number
three digit
31
Convert the permission string to octal code - rwxrwxrwx
777
32
Convert the permission string to octal code - rwxrw-rw-
755
33
Convert the permission string to octal code - rwxr-x---
750
34
Convert the permission string to octal code - rw-rw-rw-
666
35
Convert the permission string to octal code - rw-r--r--
644
36
Convert the permission string to octal code - r--------
400
37
Convert the permission string to octal code - rw-------
600
38
Directories use the blank to grant permission to enter the directory and access files
execute bit
39
Directories are files that are interpreted in a special way. As such, if a user can can blank to a directory, that user can create, delete, or rename files in the directory, even if the user isn't the owner of those files and does not have permission to write to those files
write
40
Permissions on symbolic links are always blank, but the access applies only to the link file itself, not to the linked-to-file itself
777
41
Many of the file permission rules don't apply to blank. They can read and write to any file, but they still need an execute bit set to run a program.
root
42
Do you need root access to change the file permissions on the files you own?
No
43
In the text-mode shell, you can use blank to change permissions
chmod
44
When using chmod, you can specify the file permissions in what two ways?
octal or symbolic code
45
When using chmod, changing via symbolic code consists of what three parts
A code for what set of permissions you want to change A symbol indicating whether you want to add, delete, or set the mode equal to the initial value A code setting the r,w,x values
46
When using chmod, changing via symbolic code what does the a, u, g and o codes each stand for?
all user(owner) group other
47
The blank determines the default permissions for new files and directories by removing the octal code provided from the default 666 for file permissions or 777 for directory permissions
user mask, or umask
48
Typically, the umask file appears in a blank, like /etc/profile or in a blank like ~/.bashrc
system configuration file user configuration file
49
Modifying a file requires the ability to write to the file, but creating or deleting a file requires blank
write access to the directory in which it resides
50
With the blank set on a directory, Linux will permit you to delete a file only if you own it or the containing directory
sticky bit
51
Name the two ways that you can set the sticky bit
1) Using chmod with octal code and a preceding 1(turn on) or 0(turn off) before the octal code 2) Using chmod on the o option with a +t to add sticky bit or -t to turn off sticky bit
52
If a program needs to run with elevated privileges (like passwd), the blank option tells Linux to run the program with the permissions of whoever owns the file rather than with the permissions of the user who runs the program. It changes the x in symbolic code for the user to s
Set User ID (SUID)
53
If a program needs to run with elevated privileges (like passwd), the blank option tells Linux to set the group of the running program to the group of the file. It changes the x in the group in symbolic code to s.
Set Group ID (SGID)
54
Name the two ways to set the SUID and SGID
octal code - leading value (aside from the 777) to 4 for SUID, 2 to SGID or 6 for both symbolic code - chmod for just userid do u+(or- to turn off)s for SUID, g+(or-)s for SGID, or ug+(-)s for both
55
What is the naming convention to hide files from commands like the ls command
put a preceding .(dot) to the file name to create a dot file
56
What option can you include with ls to see dot files?
-a
57
In the ls -la listing, if you see just a dot(.) where filename normally is what does that mean?
the current directory is hidden
58
In the ls -la listing, if you see just a .. where filename normally is what does that mean?
the parent directory is hidden
59
If you're working in a directory that holds many subdirectories, and if you use the wildcard with ls that matches one or more subdirectories, the result will show blank instead of the information on the subdirectories themselves
the files in the matched subdirectory
60
If you use the blank option with ls -l, you will get information on subdirectories rather than the contents of those subdirectories
-d
61
What command would you use type (as root) to change the ownership of somefile.txt from ralph to tony? A) chown ralph:tony somefile.txt B) chmod somefile.txt tony C) chown somefile.txt tony D) chown tony somefile.txt E) chmod tony somefile.txt
D
62
Typing ls -ld wonderjaye reveals a symbolic file mode of drwxr-xr-x. Which of the following are true (select all that apply)? A) wonderjaye is a symbolic link B) wodnerjaye is an executable program C) wonderjaye is a directory D) woderjaye may be read by all users of the system E) wonderjaye may be written by any member of the file's group
C,D,
63
Which of the following commands can you use to change a group? A) groupadd B) groupmod C) chmod D) ls E) chown
E
64
True or False: A file with permission of 755 can be read by all users on the computer, assuming all users can read the directory in which it resides
True
65
True or False: Only root users can use the chmod command
False
66
True or False: Only root can change a file's ownership with chown
True
67
The blank option causes chown to change ownership of an entire directory
-R
68
The three character symbolic string blank represents read and execute permissions but no write permissions
r-x
69
The chmod symbolic representation blank allows all users execute file access to a file without affecting other permissions
a+x
70
You want to set the sticky bit on an existing directory, subdir, without otherwise altering its permissions. To do so, you would type chmod blank subdir
o+t