Modify File and Directory Ownership / Configure Special Permissions and Attributes Flashcards

1
Q

Change owner but not group

A

chown {user name} {file/directory name}

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

Change owner and group

A

chown {user name} :{group name} {file directory name}

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

Changes owner and group to specified user’s login group

A

chown {user name}: {file/directory name}

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

Change group but not owner (Same as chgrp command)

A

chown :{group name} {file/directory name}

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

Change a group without using chown

A

chgrp {group name} {file / directory name}

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

set SUID on a file using symbolic and absolute mode

A

chmod u+s {file names}

chmod 4### {file names}

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

set GUID on file using symbolic and absolute mode

A

chmod g+s {file names}

chmod 2### {directory names}

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

Removing SUID and SGID in symbolic and absolute mode

A

symbolic: use - symbol
absolute: 0###

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

Special permission bit that ensures only the owner of a file or directory (or root) can delete the file or directory

A

sticky bit

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

set sticky bit using symbolic and absolute mode

A

chmod +t {directory or file name}

chmod 1### {directory or file name}

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

remove sticky bit using symbolic and absolute mode

A

chmod -t {directory or file name}

chmod 0###

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

attribute of a file or directory that prevents it from being modified, even by root

how is it indicated in file attributes?

A

immutable flag

lowercase i in attributes indicates it

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

command used to list the attributes of a file or directory

A

lsattr [options] {file/directory name}

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

option to list directories like files, instead of listing their contents

A

-d

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

option to list the version number of the file

A

-v

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

command to change attributes of a file or directory

A

chattr

17
Q

option to make file immutable (requires super user privileges)

A

chattr +i {file/directory name}

18
Q

command used to retrieve ACLs of files and directories

A

getfacl

19
Q

change permissions associated with ACL of a file or directory

A

setfacl