Search This Blog

Thursday, November 22, 2018

Relabel files with latest SELinux policy

If you see warnings that some actions were not allowed because of current SELinux policy, it might be a case of having some files incorrectly label with SELinux permissions. This might happen in case of some bug or if you had SELinux disabled in some point of time in the past. You can relabel the whole system by running:

$ sudo touch /.autorelabel
and rebooting. The next boot will take a long time and will check and fix all SELinux labels on all your files.