From 12b1a70d455779a1058706f7795d025247f69000 Mon Sep 17 00:00:00 2001 From: Pranav Lawate Date: Sun, 5 Oct 2025 18:01:08 +0530 Subject: [PATCH 1/6] restorecond: add page --- pages/linux/restorecond.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 pages/linux/restorecond.md diff --git a/pages/linux/restorecond.md b/pages/linux/restorecond.md new file mode 100644 index 00000000000000..cba7e4fa2369e3 --- /dev/null +++ b/pages/linux/restorecond.md @@ -0,0 +1,30 @@ +# restorecond + +> Daemon that monitors file creation and automatically restores SELinux contexts. +> Useful for directories where files are frequently created with incorrect contexts. +> See also: `restorecon`, `semanage-fcontext`. +> More information: . + +- Start the restorecond daemon: + +`sudo restorecond` + +- Run restorecond in verbose mode to see restoration events: + +`sudo restorecond -v` + +- Run restorecond in debug mode: + +`sudo restorecond -d` + +- Run restorecond in foreground mode (do not daemonize): + +`sudo restorecond -f` + +- Check the status of the restorecond service: + +`sudo systemctl status restorecond` + +- Enable restorecond to start at boot: + +`sudo systemctl enable --now restorecond` From 4e9e28914d273d88085d787373274e2acd853ef5 Mon Sep 17 00:00:00 2001 From: Pranav Lawate Date: Sun, 5 Oct 2025 20:06:13 +0530 Subject: [PATCH 2/6] Update pages/linux/restorecond.md Co-authored-by: Dylan <145150333+dmmqz@users.noreply.github.com> --- pages/linux/restorecond.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/linux/restorecond.md b/pages/linux/restorecond.md index cba7e4fa2369e3..8faaa7ea3091fa 100644 --- a/pages/linux/restorecond.md +++ b/pages/linux/restorecond.md @@ -5,7 +5,7 @@ > See also: `restorecon`, `semanage-fcontext`. > More information: . -- Start the restorecond daemon: +- Start the `restorecond` daemon: `sudo restorecond` From ddb8bc1b05a39ee51524befb98b933edf3003be9 Mon Sep 17 00:00:00 2001 From: Pranav Lawate Date: Sun, 5 Oct 2025 20:06:24 +0530 Subject: [PATCH 3/6] Update pages/linux/restorecond.md Co-authored-by: Dylan <145150333+dmmqz@users.noreply.github.com> --- pages/linux/restorecond.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/linux/restorecond.md b/pages/linux/restorecond.md index 8faaa7ea3091fa..58ee8d91432c2e 100644 --- a/pages/linux/restorecond.md +++ b/pages/linux/restorecond.md @@ -9,7 +9,7 @@ `sudo restorecond` -- Run restorecond in verbose mode to see restoration events: +- Run `restorecond` in [v]erbose mode to see restoration events: `sudo restorecond -v` From fc03d3b387038709b6a09b949927fd72ff35ee21 Mon Sep 17 00:00:00 2001 From: Pranav Lawate Date: Sun, 5 Oct 2025 20:06:31 +0530 Subject: [PATCH 4/6] Update pages/linux/restorecond.md Co-authored-by: Dylan <145150333+dmmqz@users.noreply.github.com> --- pages/linux/restorecond.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/linux/restorecond.md b/pages/linux/restorecond.md index 58ee8d91432c2e..b335f48adfbcc0 100644 --- a/pages/linux/restorecond.md +++ b/pages/linux/restorecond.md @@ -13,7 +13,7 @@ `sudo restorecond -v` -- Run restorecond in debug mode: +- Run `restorecond` in [d]ebug mode: `sudo restorecond -d` From 3771e68805b6c0e4a84d2cabed80bec4f03f3076 Mon Sep 17 00:00:00 2001 From: Pranav Lawate Date: Sun, 5 Oct 2025 20:37:58 +0530 Subject: [PATCH 5/6] restorecond: update examples with long-form options --- pages/linux/restorecond.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/linux/restorecond.md b/pages/linux/restorecond.md index b335f48adfbcc0..4de79ff3086871 100644 --- a/pages/linux/restorecond.md +++ b/pages/linux/restorecond.md @@ -17,9 +17,9 @@ `sudo restorecond -d` -- Run restorecond in foreground mode (do not daemonize): +- Use alternative restorecond.conf file: -`sudo restorecond -f` +`sudo restorecond -f restorecond_file` - Check the status of the restorecond service: From 313d7b67852334ceb7ea197cbccaa3d005e5e969 Mon Sep 17 00:00:00 2001 From: Pranav Lawate Date: Tue, 7 Oct 2025 19:19:52 +0530 Subject: [PATCH 6/6] Update pages/linux/restorecond.md Co-authored-by: Managor <42655600+Managor@users.noreply.github.com> --- pages/linux/restorecond.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/linux/restorecond.md b/pages/linux/restorecond.md index 4de79ff3086871..e658e3482d9c5f 100644 --- a/pages/linux/restorecond.md +++ b/pages/linux/restorecond.md @@ -27,4 +27,4 @@ - Enable restorecond to start at boot: -`sudo systemctl enable --now restorecond` +`sudo systemctl enable restorecond --now`