CH 5: SELinux Flashcards
1
Q
find SELinux status?
A
getenforce
2
Q
set SELinux to Permissive/Enforcing
A
setenforce 0 (for permissive), setenforce 1 (for enforcing)
3
Q
set SELinux to disabled
A
edit /etc/selinux/config file SELINUX=disabled
reboot to take affect
4
Q
how to set the SELinux context for a file
A
semanage fcontext
5
Q
change the context of /virtual
A
chcon -t httpd_sys_content_t /virtual
6
Q
restore the original context of a file or directory such as /virtual
A
restorecon -v /virtual
the -v means show changes, you can add -v -v -v for additional info
7
Q
most common regular expression used by semanage fcontext
A
(/.*)?