Man page - matchpathcon(8)
Packages contains this manual
- selabel_db(5)
- x_contexts(5)
- selabel_media(5)
- matchpathcon(8)
- selabel_x(5)
- getsebool(8)
- file_contexts.subs_dist(5)
- sepgsql_contexts(5)
- media(5)
- setenforce(8)
- default_contexts(5)
- failsafe_context(5)
- avcstat(8)
- file_contexts.local(5)
- seusers(5)
- file_contexts(5)
- service_seusers(5)
- customizable_types(5)
- user_contexts(5)
- getenforce(8)
- sefcontext_compile(8)
- selabel_file(5)
- selinux(8)
- togglesebool(8)
- file_contexts.homedirs(5)
- selinuxenabled(8)
- virtual_image_context(5)
- selinuxexeccon(8)
- virtual_domain_context(5)
- default_type(5)
- securetty_types(5)
- removable_context(5)
- file_contexts.subs(5)
- booleans(8)
- secolor.conf(5)
apt-get install selinux-utils
Manual
matchpathcon
NAMESYNOPSIS
DESCRIPTION
OPTIONS
EXAMPLE
AUTHOR
SEE ALSO
NAME
matchpathcon - get the default SELinux security context for the specified path from the file contexts configuration
SYNOPSIS
matchpathcon [ -V ] [ -N ] [ -n ] [ -m type ] [ -f file_contexts_file ] [ -p prefix ] [ -P policy_root_path ] filepath...
DESCRIPTION
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
-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 up translations
-P policy_root_path
Use alternate policy root path
|
-V |
Verify file context on disk matches defaults |
EXAMPLE
Show the default
label of sock_file cups.sock
# matchpathcon -m sock_file /var/run/cups/cups.sock
Verify that /var/www/html directory is labeled correctly
(the content of the folder is not checked)
# matchpathcon -V /var/www/html
AUTHOR
This manual page was written by Dan Walsh <dwalsh@redhat.com>.
SEE ALSO
selinux (8), matchpathcon (3)