Red Hat Certified System Administrator (RHCSA) EX200 Study Guide
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
12/ 17/ 12<br />
www. linuxexplor er s. com / r ed- hat - cer t if ied- syst em - adm inist r at or - r hcsa- ex200- st udy- guide/<br />
11/ 11<br />
List and identify SELinux file and process context.<br />
# ls -Z //lists SELinux context for directories<br />
# ps -ef -Z //lists SELinux context for processes<br />
# id -Z //List SELinux contexts for users<br />
# cp -Z // directory copy SELinux context for files. If not specified the file inherits the contex for the<br />
destination directory<br />
Restore default file contexts.<br />
# restorecon <br />
Use boolean settings to modify system SELinux settings.<br />
# getsebool -a //lists all SELinux boolean settings<br />
# setsebool -p =1 //turns on SELinux boolean setting<br />
Example:<br />
#setsebool -P sam ba_run_unconfined=1<br />
settings can also be toggled with<br />
# togglesebool <br />
SELinux booleans can also be configured with the sy stem-config-selinux<br />
Diagnose and address routine SELinux policy violations.<br />
# sealert -a /v ar/log/audit/audit.log