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 

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

Popular posts from this blog

HAproxy logging

teamcity Automatic Agent Start under Linux

NFS mount add in fstab _netdev instead of default | firewall-cmd --list-all