Permissions and Ownership Flashcards

1
Q

What does read permissions for a directory mean?

A

List directory content

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

What does write permissions for a directory mean?

A

Create, rename, delete

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

What does execute permissions for a directory mean?

A

Access directory, execute file, perform task

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

What is the command to modify the permissions of a file or directory?

A

sudo chmod [options] [mode] [file/directory]

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

What does the -c flag for chmod do?

A

Report changes

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

What does the -f flag for chmod do?

A

Hide error messages

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

What does the -v flag for chmod do?

A

Outputs a diagnostic for every file processed.

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

What does the -R flag for chmod do?

A

Recursively modify permissions

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

What is the command to view a users default permissions for newly created files and directories?

A

umask

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

What is the command to display a users default permissions for newly created files and directories in symbolic value?

A

umask -S

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

What is the command to display a users default permissions for newly created files and directories in number form value?

A

umask -p

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

What is the command to change the owner of a file or directory?

A

chown [user] [file/directory]

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

What is the command to change the user and group owner of a file or diretory?

A

chown [user]:[group] [file/directory]

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

What is the flag to recursively change the permissions of a directory?

A

-R

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

What is the command to change the group ownership of a file or directory?

A

chgroup [name] [file/directory]

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

What is Set User ID (SUID)?

A

User is allowed to have similar permissions as the owner of the file

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

What is Set User Group (SGID)?

A

User is allowed to have similar permissions as the group owner of the files and directories

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

What is the command to set a users SUID in Symbolic mode?

A

chmod u+s [file names]

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

What is the command to set a groups SUID in Absolute mode?

A

chmod 4### [file names]

20
Q

What is the command to set a groups SGID in Symbolic mode?

A

chmod g+s [directory names]

21
Q

What is the command to set a groups SGID in Absolute mode?

A

chmod 2### [directory names]

22
Q

How do you remove a SUID or SGID?

A

Use the - operator in symbolic mode
Set to 0 in asbolute mode

23
Q

What is the command to add a sticky bit in symbolic mode?

A

chmod +t [file/directory name]

24
Q

What is the command to add a sticky bit in absolute mode?

A

chmod 1#### [file/directory name]

25
What is the command to add list the attributes of a file or directory?
listattr [options] [file/directory name]
26
What does the command listattr -R ?
Recursively list attributes of directories and contents
27
What does the command listattr -a do?
List all files
28
What does listattr -d do?
List directories
29
What does listattr -v do?
List files version number
30
What is the command to change the attributes of a file or directory?
chattr
30
What does chattr -R do?
Recursively change attributes of directories and content
31
What does chattr -v do?
Set files version number
32
What does chattr +l do?
Mark file as read-only and immutable
33
What does chattr -l do?
Remove read-only
34
What is the command to retrieve the ACL of files and directories?
getfacl
35
What is the command to change the permissions associated with the ACL of a file or directory?
setfacl
36
What does setfacl -r do?
Recursively set ACL permissions
37
What does setfacl -s do?
Set ACL
38
What does setfacl -m do?
Modify existing ACL
39
What does setfacl -x do?
Remove entries from existing ACL
40
What does setfacl -b do?
Remove all entries except standard permissions
41
What command can you use to verify permissions and verify the user and group ownership of a file or directory?
ls -al
42
What command can you use to verify a users groups?
groups [username]
43
What is the command to add a new group to a user?
sudo usermod -a -G [group] [user]
44
What is the command to change users primary group?
sudo usermod -g [group] [user]