2024-05-27 20:00:22 +08:00
|
|
|
# matchpathcon
|
|
|
|
|
|
|
|
> Lookup the persistent SELinux security context setting of a path.
|
|
|
|
> See also: `semanage-fcontext`, `secon`, `chcon`, `restorecon`.
|
2024-09-18 20:42:03 +02:00
|
|
|
> More information: <https://manned.org/matchpathcon.8>.
|
2024-05-27 20:00:22 +08:00
|
|
|
|
|
|
|
- Lookup the persistent security context setting of an absolute path:
|
|
|
|
|
|
|
|
`matchpathcon {{/path/to/file}}`
|
|
|
|
|
|
|
|
- Restrict lookup to settings on a specific file type:
|
|
|
|
|
|
|
|
`matchpathcon -m {{file|dir|pipe|chr_file|blk_file|lnk_file|sock_file}} {{/path/to/file}}`
|
|
|
|
|
|
|
|
- [V]erify that the persistent and current security context of a path agree:
|
|
|
|
|
|
|
|
`matchpathcon -V {{/path/to/file}}`
|