What does the .autorelabel file do in Linux?

29,716

Next time when you will reboot the system, it will relabel the filesystem for SElinux automatically.

This usually occurs when labeling a file system for SELinux for the first time, or when switching between different types of policy, such as changing from the targeted to the strict policy.

Share:
29,716

Related videos on Youtube

muellerelias
Author by

muellerelias

Updated on September 18, 2022

Comments

  • muellerelias
    muellerelias almost 2 years

    What does the .autorelabel file located at the file root / do in Linux?

    I know its something to do with SELinux but I can't find any information as to what it actually does. I am running CentOS 6.

    Thanks in advance.

  • jgoldschrafe
    jgoldschrafe over 11 years
    Changing between policy types usually doesn't necessitate a filesystem relabel -- the whole idea is that the files are already labeled semantically, and the policy needs to act on them differently. It's generally used when switching from disabled SELinux to enabled SELinux.
  • Maxim
    Maxim almost 8 years
    Can I delete this file after reboot?
  • Manny0606
    Manny0606 over 6 years
    This file will be automatically deleted after relabelling.