DOKK / manpages / debian 11 / selinux-utils / matchpathcon.8.en
matchpathcon(8) SELinux Command Line documentation matchpathcon(8)

matchpathcon - get the default SELinux security context for the specified path from the file contexts configuration

matchpathcon [-V] [-N] [-n] [-m type] [-f file_contexts_file] [-p prefix] [-P policy_root_path] filepath...

matchpathcon queries the system policy and outputs the default security context associated with the filepath.

Note: Identical paths can have different security contexts, depending on the file type (regular file, directory, link file, char file ...).

matchpathcon 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.

Force file type for the lookup. Valid types are file, dir, pipe, chr_file, blk_file, lnk_file, sock_file.
Do not display path.
Do not use translations.
Use alternate file_context file
Use prefix to speed translations
Use alternate policy root path
Verify file context on disk matches defaults

This manual page was written by Dan Walsh <dwalsh@redhat.com>.

selinux(8), matchpathcon(3)

21 April 2005 dwalsh@redhat.com