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
Q

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

A

x

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

The other way to display file permissions is a blank

A

octal code

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

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

A

add 2

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

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

A

add 4

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

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

A

add 1

30
Q

The octal code is a blank number

A

three digit

31
Q

Convert the permission string to octal code - rwxrwxrwx

A

777

32
Q

Convert the permission string to octal code - rwxrw-rw-

A

755

33
Q

Convert the permission string to octal code - rwxr-x—

A

750

34
Q

Convert the permission string to octal code - rw-rw-rw-

A

666

35
Q

Convert the permission string to octal code - rw-r–r–

A

644

36
Q

Convert the permission string to octal code - r——–

A

400

37
Q

Convert the permission string to octal code - rw——-

A

600

38
Q

Directories use the blank to grant permission to enter the directory and access files

A

execute bit

39
Q

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

A

write

40
Q

Permissions on symbolic links are always blank, but the access applies only to the link file itself, not to the linked-to-file itself

A

777

41
Q

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.

A

root

42
Q

Do you need root access to change the file permissions on the files you own?

A

No

43
Q

In the text-mode shell, you can use blank to change permissions

A

chmod

44
Q

When using chmod, you can specify the file permissions in what two ways?

A

octal or symbolic code

45
Q

When using chmod, changing via symbolic code consists of what three parts

A

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
Q

When using chmod, changing via symbolic code what does the a, u, g and o codes each stand for?

A

all
user(owner)
group
other

47
Q

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

A

user mask, or umask

48
Q

Typically, the umask file appears in a blank, like /etc/profile or in a blank like ~/.bashrc

A

system configuration file
user configuration file

49
Q

Modifying a file requires the ability to write to the file, but creating or deleting a file requires blank

A

write access to the directory in which it resides

50
Q

With the blank set on a directory, Linux will permit you to delete a file only if you own it or the containing directory

A

sticky bit

51
Q

Name the two ways that you can set the sticky bit

A

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
Q

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

A

Set User ID (SUID)

53
Q

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.

A

Set Group ID (SGID)

54
Q

Name the two ways to set the SUID and SGID

A

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
Q

What is the naming convention to hide files from commands like the ls command

A

put a preceding .(dot) to the file name to create a dot file

56
Q

What option can you include with ls to see dot files?

A

-a

57
Q

In the ls -la listing, if you see just a dot(.) where filename normally is what does that mean?

A

the current directory is hidden

58
Q

In the ls -la listing, if you see just a .. where filename normally is what does that mean?

A

the parent directory is hidden

59
Q

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

A

the files in the matched subdirectory

60
Q

If you use the blank option with ls -l, you will get information on subdirectories rather than the contents of those subdirectories

A

-d

61
Q

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

A

D

62
Q

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

A

C,D,

63
Q

Which of the following commands can you use to change a group?

A) groupadd
B) groupmod
C) chmod
D) ls
E) chown

A

E

64
Q

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

A

True

65
Q

True or False: Only root users can use the chmod command

A

False

66
Q

True or False: Only root can change a file’s ownership with chown

A

True

67
Q

The blank option causes chown to change ownership of an entire directory

A

-R

68
Q

The three character symbolic string blank represents read and execute permissions but no write permissions

A

r-x

69
Q

The chmod symbolic representation blank allows all users execute file access to a file without affecting other permissions

A

a+x

70
Q

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

A

o+t