Control SELinux File Contexts Flashcards

1
Q

What command starts and enables Apache web service?

A

systemctl enable –now httpd

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

What command verifies the Apache web service is running?

A

systemctl status httpd

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

What command is used to define the SELinux file context rule that sets the context type to httpd_sys_content_t for the /custom directory and all files under it?

A

semanage fcontext -a -t httpd_sys_content_t ‘/custom(/.*)?’

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

What command is used to correct the file contexts in the /custom directory?

A

restorecon -Rv /custom

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

What command is used to create a public_html directory?

A

mkdir ~/public_html

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

What command changes permission of /home/student directory to allow access of public_html folder?

A

chmod 711 ~

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

What command is used to see whether any Booleans restrict access to home directories for httpd service?

A

getsebool -a | grep home

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

What boolean command is used to enable persistent access to the home directory for httpd service?

A

setsebool -P httpd_enable_homedirs on

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