4-4 Create and Manage Access Control Lists (ACLs) Flashcards

1
Q

ACL means

A

File access control lists (ACLs) are intended to give finer-grained control over specific file permissions. Named users and named groups that have a UID and GID can take advantage or be assigned to ACLs. ACLs are added in addition to the regular permissions that already existent on a file. The file system has to be mounted with ACL option enabled; not all systems support ACLs.

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

When ACLs are set on a file or directory using the chmod command, it only updates the masks and not the permissions.

A

what does that answer/question to this one mean?????

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

ls -l

-rw-rw-r–+ 1 root root 45 Mar 2 17:01 1.txt

A

ACLs are set on the directory or file if ls permissions end with a +

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

what are

Extended ACL Entries

A

Extended ACL entries are those that contain named groups users or more than the minimum ACLs

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

what are

Base/Minimum ACL Entries

A

Base/minimum ACL entries are the original ACL entries on a file that contains ACL entries for the owner, group, and other

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

Is ACL always available on a system?

A

File systems must be enabled and mounted with ACL support in order for ACLs to work. By default the XFS and EXT4 file systems ON RED HAT 7 have ACL support enabled.

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

setfacl -m g:namedgroup:rw file

A

et the named group permissions to rw for a file

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

setfacl -m g::rw file

A

Set the group owner permission to rw for a file

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

setfacl -m u::rw file

A

Set the user owner permissions to rw for a file

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

setfacl -m o::rw file

A

Set “other” permissions on a file

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

you can denote -

A

In order to remove ACL permissions on a file

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

setfacl -m o::rw,u::rw file

A

Multiple ACL entries can be specified by separating the entries with a comma

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

setfacl -m o::rw,u::rw file

A

Multiple ACL entries can be specified by separating the entries with a comma

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

setfacl -x g:groupname file
setfacl –remove-all [file/dir]

use -R for recursion

A

Remove a named group entry from a file’s ACL

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

getfacl file1 | setfacl –set-file=- file2

Take the ACL from file1 as standard input for setfacl command. The - at the end of –set-
file=- represents the use of standard input (stdin).

A

Copying ACLs from One File to Another

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

Setting Default ACLs

A

Directories can have default ACLs that les will inherit when new les are created inside of the directory. Default ACLs on a directory ONLY provide support for inheritance; they are not the ACLs that are enforced on a directory. Thus, you will also have to set regular base/extended ACLs on the directory

17
Q

setfacl -m d:u:nameduser:rx dir1

Notice the d for “default”; all else is the same as when setting default permissions

A

Set a default named user on directory dir1

18
Q

setfacl –remove-default directory

A

Delete all default ACLs on a directory

19
Q

getfacl file1

A

display a file’s acl info including base/minimum ACL entries

the permissions shown by ls -l are also shown here as the base minimum acl

20
Q

meaning of

setfacl -m u:user:rw file

A

setfacl -m u:theuser:rw file
-m means modify
u: means user, as in the next bit is the user to be added to acl (to be able to access) that file
:rw means user will have access to read and write regarding that file

‘theuser’ maps to uid, so if deleted and new of same name is made, it will have to be re-added as it maps to user

21
Q

‘mask:’ in getfacl file1

setfacl -m m::r file1
the m: will set file1’s acl mask(maximum permission) to read

to set to none use -
setfacl -m m::- 1.txt

setfacl on file will reset mask
chmod on file will reset mask

A

‘mask’ shows the maximum permissions, if working with masks set after setting acl because acl will reset it, acl can be set with a flag that says not to change mask

chmod if used on file will also changes file’s acl mask

22
Q

setfacl -d -m u::rw dir1

getfacl dir1
‘default:’

setfacl –remove-default dir1

getfacl dir1

A

Set default acl permissions that inherit to all files and directories made inside of it
use -R on directories to set defaults recursively

check default acl permissions

remove default permissions (not set to zero, but remove)

23
Q

setfacl -x d:u:theuser dir1

A

remove user ‘the’ user’s default permissions in acl

24
Q

setfacl -m u::rw dir1

A

by not specifying a user (or group when g:) to add to acl list, it will set regular permissions, see ls -l

will change base level acl user permissions in getfacl