Investigate and Resolve SELinux Issues Flashcards
1
Q
What command is used to view contents of the /var/log/messages file?
A
less /var/log/messages
2
Q
What command verifies the SELinux context for the directory from where the httpd service serves the content by default, /var/www/html?
A
ls -ldZ /var/www/html
3
Q
What command is used to search the audit.log for messages and based on time?
A
ausearch -m AVC -ts today
4
Q
What command is used to resolve the context issue with an Apache server directory, and all files underneath?
A
semanage fcontext -a -t httpd_sys_content_t ‘/custom(/.*)?’
restorecon -Rv /custom