list file context SELinux
[root@localhost ~]# semanage fcontext -l | more
SELinux fcontext type Context
/.* all files system_u:object_r
:default_t:s0
/[^/]+ regular file system_u:object_r
:etc_runtime_t:s0
/a?quota\.(user|group) regular file system_u:object_r
:quota_db_t:s0
/nsr(/.*)? all files system_u:object_r
:var_t:s0
SELinux fcontext type Context
/.* all files system_u:object_r
:default_t:s0
/[^/]+ regular file system_u:object_r
:etc_runtime_t:s0
/a?quota\.(user|group) regular file system_u:object_r
:quota_db_t:s0
/nsr(/.*)? all files system_u:object_r
:var_t:s0
useful command is ls -Z
[root@localhost sales]# ls /etc -lZ | grep http
drwxr-xr-x. root root system_u:object_r:httpd_config_t:s0 httpd
[root@localhost sales]#
by the policy source and target context should match
[root@localhost sales]# ps Zaux | grep dns
system_u:system_r:dnsmasq_t:s0-s0:c0.c1023 nobody 1655 0.0 0.0 15544 784 ? S Oct15 0:00 /sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/libexec/libvirt_leaseshelper
Comments
Post a Comment