restorecon Command Examples

Restore SELinux security context on files/directories according to persistent rules. See also: semanage-fcontext. More information: https://manned.org/restorecon.

ls -dlZ {{path/to/file_or_directory}}

restorecon {{path/to/file_or_directory}}

restorecon -R -v {{path/to/directory}}

restorecon -R -T {{0}} -p {{path/to/directory}}

restorecon -R -n -v {{path/to/directory}}