MAKE SURE SELINUX IS DISABLED FIRST
5.4.2. DISABLING SELINUX
When SELinux is disabled
SELinux policy is not loaded at all. It is not enforced and AVC messages are not logged. Therefore, all benefits of running SELinux listed in Section 2.1, “Benefits of running SELinux” are lost.
Important
Red Hat strongly recommends to use permissive mode instead of permanently disabling SELinux. See Section 5.4.1.2, “Permissive Mode” for more information about permissive mode. To permanently disable SELinux, follow the procedure below:
Procedure 5.4. Disabling SELinux
Configure SELINUX=disabled in the /etc/selinux/config file
SELINUXTYPE=targeted
Reboot your system. After reboot, confirm that the getenforce command returns Disabled:
$ getenforce
Disabled
HOW TO REMOVE SELINUX CONTEXT FROM FILES
The following command will remove the "dots" (will remove the SELinux context). This will remove all the SELinux context from all files and directories in /home:
$find /home -exec sudo setfattr -h -x security.selinux {} \;
BEFORE (“dot” present)
$ ls -lrt / |grep home
drwxr-xr-x. 22 root root 4.0K Sep 9 16:25 /home
AFTER ("dot" removed)
$ ls -lrt / |grep home
drwxr-xr-x 22 root root 4.0K Sep 9 16:26 /home
References
How to Remove SELinux Context from Files.
touch /.autorelabel && reboot
– Mark Stewart Feb 13 '20 at 17:26