Relabeling a File System

If you see an error message that contains the string file_t, this probably means that the file system has an incorrect context label. This task shows you how to relabel the file system.

  1. Create the .autorelabel file.

    Create an empty file called .autorelabel in the root of the file system:

    sudo touch /.autorelabel

    Or, you can run the following command:

    sudo fixfiles -F onboot

    Either method performs a full SELinux relabel of the file system on the next boot, to ensure all files have the correct SELinux context labels according to policy.

  2. Reboot the system.