restorecond(8)

πŸ“¦
version 3.11 Β· 2 versions
, in centos-stream 10, centos-stream 9, fedora 44, nixpkgs unstable, ubuntu stonking

πŸ’– restorecond β€” bestie's guide to the SELinux context babysitter πŸ’–

okay so this is the manual page for restorecond, and honestly? she's a little icon. the page header says restorecond(8) and yeah, that's the whole vibe. let's get into it 🫢


✨ NAME ✨

restorecond β€” a daemon that watches for file creation and then sets the default SELinux file context πŸ’…

like. she literally sits there and goes "oh?? a new file?? let me fix your context real quick bestie" πŸŽ€


✨ SYNOPSIS ✨

restorecond [-d] [-h] [-f restorecond_file ] [-F] [-u] [-v]

✨ DESCRIPTION ✨

so this manual page describes the restorecond program. that's the assignment, and she ate πŸ’–

this daemon uses inotify to watch files listed in the /etc/selinux/restorecond.conf, and when they are created, this daemon will make sure they have the correct file context associated with the policy. no cap. she's watching. always watching. πŸ‘‘


✨ OPTIONS ✨

  • -d β€” turns on debugging mode πŸ”₯ application will stay in the foreground and lots of debugs messages start printing. it's giving unhinged journaling energy ngl
  • -h β€” print usage statement. the "help me help you" flag, we love her
  • -f restorecond_file β€” use alternative restorecond.conf file. not feeling the default? pick your own, main character behaviour 🌈
  • -F β€” run in foreground, do not become a daemon. she stays right there with you, holding your hand 🫢
  • -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. one (1) restorecond per user session, she does NOT share πŸ’…
  • -v β€” turns on verbose debugging. (report missing files) πŸ‘€ she WILL tell you what's missing, she's a gossiper, iykyk

✨ AUTHOR ✨

this man page and program was written by Dan Walsh <dwalsh@redhat.com>. king behaviour, no notes πŸ‘‘


✨ FILES ✨

  • /etc/selinux/restorecond.conf
  • /etc/selinux/restorecond_user.conf

these are the girls she's reading from πŸ“


✨ SEE ALSO ✨


okay so that's the whole page bestie, go forth and let her fix your file contexts πŸ’–βœ¨πŸŽ€

sign-off moment: this page comes from the restorecond(8) manual, dated 2002031409, and yeah β€” that date is lowkey ancient but she still serves. periodt. πŸ’…πŸ¦‹πŸŒΈ