What is .autorelabel file in SELinux

  • مسیر قرار گرفتن این پرونده درون شاخه‌ی اصلی فایل سیستم یعنی / می‌باشد.
  • همان طور که از نام این پرونده مشخص است ، از این پرونده به منظور Lable زدن به صورت خودکار بر روی کل فایل سیستم استفاده می‌شود.
  • این اتفاق زمانی خواهد افتاد که Policy مربوط به SELinux از حالت Targeted به strict تغییر یافته باشد یا زمانی که قصد روشن کردن SELinux را داشته باشید. (منظور تغییر وضعیت SELinux از حالت Disable به یکی از حالات enforcing یا permissive است.)

  • Sometimes it is necessary to relabel the complete filesystem although this should only be necessary when enabling SELinux after it has been disabled or when changing the SELinux policy from the default targeted policy to strict.
  • To automatically relabel the complete filesystem upon reboot, do:
# touch /.autorelabel
# reboot
  • Sometimes a complete filesystem relabel will fail if the system has been upgraded to CentOS-5.2 with SELinux disabled, and SELinux is then enabled.
  • If the above procedure doesn’t correctly perform a complete filesystem relabel, try issuing the ‘genhomedircon’ command first:
# genhomedircon
# touch /.autorelabel
# reboot

دیدگاهتان را بنویسید

نشانی ایمیل شما منتشر نخواهد شد. بخش‌های موردنیاز علامت‌گذاری شده‌اند *