Control SELinux File Contexts Flashcards
1
Q
What command do you use to create a directory for Apache in a non-standard location?
A
mkdir /custom
2
Q
What command do you use to configure Apache to use a new directory location?
A
vim /etc/httpd/conf/httpd.conf
3
Q
What command do you use to start and enable the Apache web service?
A
systemctl enable –now httpd
4
Q
What command do you use to verify Apache web service is running?
A
systemctl status httpd
5
Q
What command do you use to define the SELinux file context rule that sets the context type to httpd_sys_content_t?
A
semange fcontext -a -t httpd_sys_content_t ‘/custom(/.*)?’
6
Q
What command is used to correct file contexts in the /custom directory?
A
restorecon -Rv /custom