1matchpathcon(8)       SELinux Command Line documentation       matchpathcon(8)
2
3
4

NAME

6       matchpathcon  - get the default SELinux security context for the speci‐
7       fied path from the file contexts configuration
8

SYNOPSIS

10       matchpathcon [-V] [-N] [-n] [-m type] [-f file_contexts_file] [-p  pre‐
11       fix] [-P policy_root_path] filepath...
12

DESCRIPTION

14       matchpathcon queries the system policy and outputs the default security
15       context associated with the filepath.
16
17       Note: Identical paths can have different security  contexts,  depending
18       on the file type (regular file, directory, link file, char file ...).
19
20       matchpathcon  will also take the file type into consideration in deter‐
21       mining the default security context if the file  exists.  If  the  file
22       does not exist, no file type matching will occur.
23

OPTIONS

25       -m type
26              Force  file  type  for  the  lookup.  Valid types are file, dir,
27              pipe, chr_file, blk_file, lnk_file, sock_file
28
29       -n     Do not display path
30
31       -N     Do not use translations
32
33       -f file_context_file
34              Use alternate file_context file
35
36       -p prefix
37              Use prefix to speed up translations
38
39       -P policy_root_path
40              Use alternate policy root path
41
42       -V     Verify file context on disk matches defaults
43

EXAMPLE

45       Show the default label of sock_file cups.sock
46       # matchpathcon -m sock_file /var/run/cups/cups.sock
47       Verify that /var/www/html directory is labeled correctly (the content of the folder is not checked)
48       # matchpathcon -V /var/www/html
49

AUTHOR

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

SEE ALSO

54       selinux(8), matchpathcon(3)
55
56
57
58dwalsh@redhat.com                21 April 2005                 matchpathcon(8)
Impressum