Closed djnotes closed 2 years ago
SELinux has a concept called "customizable_types" and it can be used to tell restorecon not to reset any objects that currently have "customizable types" associated with it -- unless you run restorecon with -F
You can find the list of customizable types here:
. /etc/selinux/config
cat /etc/selinux/"${SELINUXTYPE}"/contexts/customizable_types
So to answer your question, use:
restorecon -R -v -F /home/myhome/src
instead of:
restorecon -R -v /home/myhome/src
When you see such messages with "customized by admin"
Description
I am not sure if I have messed up somehow in the past with a directory named src under my home directory, causing it to get the context system_u:object_r:container_file_t (mostly not as a whole). Myabe it happened when I had problems with Podman permissions and trying to give it correct SELinux context. Now, I have created a new wordpress directory in that folder and I want to give it httpd-friendly context following this redhat doc to make it server as the document root of my local Apache instance. So, I run the following commands as root:
which gives the following output:
I have never experienced this before.
System Information
More system information just in case:
Fedora 35 Apache 2.4.51