Differences
This shows you the differences between two versions of the page.
linux_wiki:list_and_identify_selinux_file_and_process_context [2018/04/29 23:21] billdozor [Install SELinux Man Pages] |
linux_wiki:list_and_identify_selinux_file_and_process_context [2019/05/25 23:50] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== List And Identify Selinux File And Process Context ====== | ||
- | |||
- | **General Information** | ||
- | |||
- | Viewing selinux contexts. | ||
- | |||
- | ---- | ||
- | |||
- | ===== About Context Labels ===== | ||
- | |||
- | Three parts of a context label | ||
- | * **User** => Ends in " | ||
- | * **Role** => Ends in " | ||
- | * **Type** => Ends in " | ||
- | |||
- | ---- | ||
- | |||
- | ===== Viewing Context Labels ===== | ||
- | |||
- | List selinux context | ||
- | <code bash> | ||
- | ls -Z /var/www/ | ||
- | |||
- | drwxr-xr-x. root root system_u: | ||
- | drwxr-xr-x. root root system_u: | ||
- | </ | ||
- | * Context type is " | ||
- | |||
- | \\ | ||
- | List all selinux contexts on system | ||
- | <code bash> | ||
- | semanage fcontext -l | ||
- | semanage fcontext -l | grep httpd | ||
- | </ | ||
- | |||
- | \\ | ||
- | Identify a process context | ||
- | <code bash> | ||
- | ps auxZ | grep httpd | ||
- | |||
- | system_u: | ||
- | </ | ||
- | * " | ||
- | |||
- | ---- | ||
- | |||
- | ===== Install SELinux Man Pages ===== | ||
- | |||
- | While not part of an objective, being able to do this could help you on the examine if you are not sure what SELinux context to apply. | ||
- | |||
- | \\ | ||
- | To install application specific SELinux man pages... | ||
- | |||
- | * Check to see how many SELinux specific man pages are available< | ||
- | * If there are only a few, you need to install them. | ||
- | * sepolicy is the command needed to install, check what provides that< | ||
- | * Install the required package< | ||
- | * Install the SELinux man pages< | ||
- | * Update the man database< | ||
- | * Check to ensure the new pages exist< | ||
- | |||
- | ---- | ||
- | |||
- | ===== Install SEInfo Utility ===== | ||
- | |||
- | seinfo is a useful tool to discover available context types (among other things). | ||
- | |||
- | See what package provides it<code bash>yum provides / | ||
- | |||
- | Install the package< | ||
- | |||
- | View all the context types that are nfs related< | ||
- | |||
- | ---- | ||