5.10.3. Checking the Default SELinux Context
Use the
/usr/sbin/matchpathcon
command to check if files and directories have the correct SELinux context. From the
matchpathcon(8) manual page: "
matchpathcon
queries the system policy and outputs the default security context associated with the file path."
[13]. The following example demonstrates using the
/usr/sbin/matchpathcon
command to verify that files in
/var/www/html/
directory are labeled correctly: