INTRODUCTION

Security-Enhanced Linux (SELinux) is a superior security mechanism at the kernel degree. follow this guide to reinstall SELinux and reset the coverage to default settings. if SELinux isn't already established, move at once to step 2.

Perform those steps as a sudo-enabled person or root. this guide has been tested on:

  • Centos 8
  • Centos 7
  • Centos 6

1. Disable and remove SELinux

# setenforce 0

# yum remove selinux-policy\*

# rm -rf /etc/SELinux/targeted /etc/SELinux/config


2. Set up SELinux

# yum install SELinux-policy-targeted

# yum install SELinux-policy-devel policycoreutils

# touch /.autorelabel; reboot


SELinux will discover the /.autorelabel report on reboot, and then relabel all files with the right SELinux contents. when you have many documents, the example can be unavailable for a long term. you can monitor the instance from ONENETS SERVER web control.

Was this answer helpful? 29 Users Found This Useful (0 Votes)