File/Directory Permissions Deck Flashcards

Review Permissions - Done as root user

1
Q

chmod u+rwx file2

A

Add all permissions to owner of file2

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

chmod u-x file2

A

Remove the owner’s permission to execute file2

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

chmod g+w file2

A

Add permission to write to the group for file2

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

chmod o-rwx file2

A

Remove all permission for others for file2

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

chmod 777 dir1

A

Allow all permissions to all users for dir1

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

chmod 764 dir1

A

Allow the owner all permissions, the group read and write only and others read only for dir1

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

chmod g-rw file2

A

Remove read and write permission for the group for file2

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

chmod o+wx file2

A

Add write and execute permission for others for file2

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

chmod 464 dir1

A

Allow owner to read only, the group to read and write, the others to read only for dir1

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

chmod 661dir1

A

Allow the owner and the group to read and write only and the others to only execute for dir1

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

chmod 756 dir1

A

Allow owner all permissions, the group to read and execute only and the others to read and write only for dir1

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

chmod 532 dir1

A

Allow the owner to read and execute, the group to write and execute and the others to write only for dir1

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

Assign ownership of file8 to Group1

A

chown :Group1 file8

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

Check for file user and group ownership

A

ll

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

Assign ownership of dir4 to User2

A

chown User2 dir4

or

chown User2: dir4

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

Change group ownership of file2 from Group1 to Group2

A

chgrp Group2 file2

or

chown :Group2 file2

17
Q

Change the owner and the group of file8 simultaneously. Group - Admin, Owner- User2

A

chown User2:Admin file8

18
Q

Set user ID for Dir10 giving everyone permission to the directory as if they are the owner

A

chmod u+s Dir10

or

chmod 4(current permissions) Dir10

**current permission = 3 numerical permissions present on the directory

19
Q

Set the group ID for file8, so that it belongs to the entire group

A

chmod u+s file8

or

chmod 2(current permissions) file8

**current permission = 3 numerical permissions present on the directory

20
Q

Apply the sticky bit to file_B so that the user can only delete what the user owns

A

chmod o+t file_B

or

chmod 1(current permission) file_B

**current permission = 3 numerical permissions present on the directory