mirror of
https://pagure.io/fedora-docs/quick-docs.git
synced 2024-11-28 14:56:35 +00:00
dnf-system-upgrade: s/touch/fixfiles/ to relabel SELinux
This is a personal preference, but the `fixfiles` command is a convenient binary in Fedora that ships with SELinux to handle relabels. It does the same thing, but note the use of the `-B` flag. From the man pages: > -B: > If specified with onboot, this fixfiles will record the current date > in the /.autorelabel file, so that it can be used later to speed up > labeling. If used with restore, the restore will only affect files > that were modified today. I thought I would share this improvement upstream since I use this page often, but I prefer this way of running more lean SELinux checks. Signed-off-by: Justin W. Flory <git@jwf.io>
This commit is contained in:
parent
743e4a6ac0
commit
e3d0e3ba32
1 changed files with 4 additions and 6 deletions
|
@ -239,17 +239,15 @@ sudo dnf distro-sync --allowerasing
|
||||||
=== Relabel Files With The Latest SELinux Policy
|
=== Relabel Files With The Latest SELinux Policy
|
||||||
|
|
||||||
If you encounter any warnings regarding policies with SELinux, some files may have incorrect SELinux permissions.
|
If you encounter any warnings regarding policies with SELinux, some files may have incorrect SELinux permissions.
|
||||||
This may happen if SELinux was disabled at some point in the past.
|
This may happen if SELinux was disabled in the past.
|
||||||
To relabel the entire system run:
|
To relabel SELinux on the system, run the following command and then reboot:
|
||||||
|
|
||||||
[source,bash]
|
[source,bash]
|
||||||
----
|
----
|
||||||
sudo touch /.autorelabel
|
sudo fixfiles -B onboot
|
||||||
----
|
----
|
||||||
|
|
||||||
and reboot.
|
The boot process will likely take a long time, as it checks and fixes SELinux permission labels on all files in your system.
|
||||||
|
|
||||||
The boot process may take a long time as it is checking and fixing all SELinux permission labels on all the files in your system.
|
|
||||||
|
|
||||||
[[sect-frequently-asked-questions]]
|
[[sect-frequently-asked-questions]]
|
||||||
== Frequently Asked Questions
|
== Frequently Asked Questions
|
||||||
|
|
Loading…
Reference in a new issue