Linux Fundamentals Flashcards

1
Q

At what 3 levels can file permissions be applied?

A

User, group, other

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

What is the command to change file permissions?

A

chmod

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

What are the numerical values of read, write, and execute respecivley?

A

4, 2, 1

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

What is the declarative way of adding/removing file permissions?

A

u/g/o/a +/- r/w/x (e.g. u+w == give write permissions to user, ug-rw == remove read/write for user and group)

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

Why do directories need execute permissions?

A

To allow cd to execute against it so it can be accessed

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

What is the numerical value of no permissions on a file/dir?

A

0

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

What commands changes the ownership of a file?

A

chown

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

What commands changes the ownership of a file?

A

chgrp

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

Who has complete control over the files in a users home directory besides root?

A

The user - drwxr-x— permissions state that the user can read, write, and execute on any file regardless of the owner (even root!)

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

What is an ACL?

A

Access Control List

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

How does an ACL work with UNIX style permissions?

A

ACLs provide more fine grained controls over permissions, allowing specific users or groups access to disk resources

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

What command sets ACL permissions?

A

setfacl

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

What command gets ACL permissions?

A

getfacl

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

Give an example of the setfacl function

A

setfacl -m u:<user>:rw /path/to/file</user>

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

How can a single permission be removed for a single user using ACLs?

A

setfacl -x u:user /path/to/file

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

What symbol is added to end of the permissions list when using ACLs?

17
Q

Does write permissions by ACL allow you to delete files?

18
Q

How do you reset ACL file permissions?

A

setfacl -b /path/to/file

19
Q

Name a quick command with one line command descriptions

20
Q

What information option is usually available to all commands?

A

–help or -h

21
Q

List 4 help commands

A

whatis, whereis, man, apropos

22
Q

How can multiple commands be run from the terminal?

A

Separate them with a semi-colon. Example: whoami; pwd; ls -l;

23
Q

How can multiple commands be run from the terminal while ensuring the next command only runs if the preceding command is successful?

A

Separate them with a double ampersand. Example: mkdir -p /path/to/dir && cd /path/to/dir && touch new_file