restorecond - Man Page
daemon that watches for file creation and then sets the default SELinux file context
Examples (TL;DR)
- Start the
restoreconddaemon:sudo restorecond - Run
restorecondin [v]erbose mode to see restoration events:sudo restorecond -v - Run
restorecondin [d]ebug mode:sudo restorecond -d - Use alternative restorecond.conf file:
sudo restorecond -f restorecond_file - Check the status of the restorecond service:
sudo systemctl status restorecond - Enable restorecond to start at boot:
sudo systemctl enable restorecond --now
Synopsis
Description
This manual page describes the restorecond program.
This daemon uses inotify to watch files listed in the /etc/selinux/restorecond.conf, when they are created, this daemon will make sure they have the correct file context associated with the policy.
Options
- -d
Turns on debugging mode. Application will stay in the foreground and lots of debugs messages start printing.
- -h
Print usage statement.
- -f restorecond_file
Use alternative restorecond.conf file.
- -u
Turns on user mode. Runs restorecond in the user session and reads /etc/selinux/restorecond_user.conf. Uses dbus to make sure only one restorecond is running per user session.
- -v
Turns on verbose debugging. (Report missing files)
Author
This man page and program was written by Dan Walsh <dwalsh@redhat.com>.
Files
/etc/selinux/restorecond.conf /etc/selinux/restorecond_user.conf