21

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.

2 Answers2

12

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.

Raj
  • 247
  • 2
  • 9
  • 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. – jgoldschrafe Sep 27 '12 at 12:04
  • Can I delete this file after reboot? – Maxim Sep 01 '16 at 20:34
  • This file will be automatically deleted after relabelling. – Manny0606 Oct 03 '17 at 01:58
0

More info is provided via the CentOS docs @ http://wiki.centos.org/HowTos/SELinux, under heading 5.3

Mike Purcell
  • 1,688
  • 7
  • 30
  • 53