{"id":3545,"date":"2022-12-20T17:08:58","date_gmt":"2022-12-20T20:08:58","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/matchpathcon-man8\/"},"modified":"2022-12-20T17:08:58","modified_gmt":"2022-12-20T20:08:58","slug":"matchpathcon-man8","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/matchpathcon-man8\/","title":{"rendered":"matchpathcon (man8)"},"content":{"rendered":"<h1 align=\"center\">matchpathcon<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#SYNOPSIS\">SYNOPSIS<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#OPTIONS\">OPTIONS<\/a><br \/> <a href=\"#AUTHOR\">AUTHOR<\/a><br \/> <a href=\"#SEE ALSO\">SEE ALSO<\/a> <\/p>\n<hr>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">matchpathcon \u2212 get the default SELinux security context for the specified path from the file contexts configuration<\/p>\n<h2>SYNOPSIS <a name=\"SYNOPSIS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>matchpathcon<\/b> [<b>\u2212V<\/b>] [<b>\u2212N<\/b>] [<b>\u2212n<\/b>] [<b>\u2212m<\/b> <i>type<\/i>] [<b>\u2212f<\/b> <i>file_contexts_file<\/i>] [<b>\u2212p<\/b> <i>prefix<\/i>] [<b>\u2212P<\/b> <i>policy_root_path<\/i>] <i>filepath&#8230;<\/i><\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><i><b>matchpathcon<\/b><\/i> queries the system policy and outputs the default security context associated with the filepath.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>Note:<\/b> Identical paths can have different security contexts, depending on the file type (regular file, directory, link file, char file &#8230;).<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>matchpathcon<\/b> will also take the file type into consideration in determining the default security context if the file exists. If the file does not exist, no file type matching will occur.<\/p>\n<h2>OPTIONS <a name=\"OPTIONS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>\u2212m<\/b> <i>type<\/i><\/p>\n<p style=\"margin-left:22%;\">Force file type for the lookup. Valid types are <b>file<\/b>, <b>dir<\/b>, <b>pipe<\/b>, <b>chr_file<\/b>, <b>blk_file<\/b>, <b>lnk_file<\/b>, <b>sock_file<\/b>.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"3%\">\n<p><b>\u2212n<\/b><\/p>\n<\/td>\n<td width=\"8%\"><\/td>\n<td width=\"36%\">\n<p>Do not display path.<\/p>\n<\/td>\n<td width=\"42%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"3%\">\n<p><b>\u2212N<\/b><\/p>\n<\/td>\n<td width=\"8%\"><\/td>\n<td width=\"36%\">\n<p>Do not use translations.<\/p>\n<\/td>\n<td width=\"42%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:11%;\"><b>\u2212f<\/b> <i>file_context_file<\/i><\/p>\n<p style=\"margin-left:22%;\">Use alternate file_context file<\/p>\n<p style=\"margin-left:11%;\"><b>\u2212p<\/b> <i>prefix<\/i><\/p>\n<p style=\"margin-left:22%;\">Use prefix to speed translations<\/p>\n<p style=\"margin-left:11%;\"><b>\u2212P<\/b> <i>policy_root_path<\/i><\/p>\n<p style=\"margin-left:22%;\">Use alternate policy root path<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"3%\">\n<p><b>\u2212V<\/b><\/p>\n<\/td>\n<td width=\"8%\"><\/td>\n<td width=\"67%\">\n<p>Verify file context on disk matches defaults<\/p>\n<\/td>\n<td width=\"11%\"> <\/td>\n<\/tr>\n<\/table>\n<h2>AUTHOR <a name=\"AUTHOR\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">This manual page was written by Dan Walsh <dwalsh@redhat.com>.<\/p>\n<h2>SEE ALSO <a name=\"SEE ALSO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>selinux<\/b>(8), <b>matchpathcon<\/b>(3)<\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  matchpathcon \u2212 get the default SELinux security context for the specified path from the file contexts configuration <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[5,52,4,665],"class_list":["post-3545","post","type-post","status-publish","format-standard","hentry","category-8-administracion-del-sistema","tag-5","tag-administracion","tag-man8","tag-matchpathcon"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/3545","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/comments?post=3545"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/3545\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=3545"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=3545"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=3545"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}