Reviewing the SELinux context for files and processes
SELinux uses labels, also referred to as the security context attached to each file, and defines several aspects. Let's check one example in our home folder with the ls –l
command, but with a special modifier, Z
, that will show SELinux attributes as well, as we can see in the following screenshot:
Let's focus on the output for one of the files:
-rw-r--r--. 1 root unconfined_u:object_r:admin_home_t:s0 540 Mar 6 19:33 term.sh
The SELinux attributes are the ones listed as unconfined_u:object_r:admin_home_t:s0
:
- The first part is the user mapping:
unconfined_u
- The second part is the role:
object_r
- The third part is the type:
admin_home_t
- The fourth part is used for the level:
s0
in multi-level security and multi-category security
Something similar happens...