matchpathcon(8) — Linux manual page

NAME | SYNOPSIS | DESCRIPTION | OPTIONS | AUTHOR | SEE ALSO | COLOPHON

matchpathcon(8)    SELinux Command Line documentation    matchpathcon(8)

NAME         top

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

SYNOPSIS         top

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

DESCRIPTION         top

       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.

OPTIONS         top

       -m type
              Force file type for the lookup.  Valid types are file,
              dir, pipe, chr_file, blk_file, lnk_file, sock_file.

       -n     Do not display path.

       -N     Do not use translations.

       -f file_context_file
              Use alternate file_context file

       -p prefix
              Use prefix to speed translations

       -P policy_root_path
              Use alternate policy root path

       -V     Verify file context on disk matches defaults

AUTHOR         top

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

SEE ALSO         top

       selinux(8), matchpathcon(3)

COLOPHON         top

       This page is part of the selinux (Security-Enhanced Linux user-
       space libraries and tools) project.  Information about the
       project can be found at 
       ⟨https://github.com/SELinuxProject/selinux/wiki⟩.  If you have a
       bug report for this manual page, see
       ⟨https://github.com/SELinuxProject/selinux/wiki/Contributing⟩.
       This page was obtained from the project's upstream Git repository
       ⟨https://github.com/SELinuxProject/selinux⟩ on 2024-06-14.  (At
       that time, the date of the most recent commit that was found in
       the repository was 2023-05-11.)  If you discover any rendering
       problems in this HTML version of the page, or you believe there
       is a better or more up-to-date source for the page, or you have
       corrections or improvements to the information in this COLOPHON
       (which is not part of the original manual page), send a mail to
       man-pages@man7.org

dwalsh@redhat.com             21 April 2005              matchpathcon(8)