To restore the default file type of the directory hierarchy
/var/webcontent
after previously changing it to
httpd_sys_content_t
:
Use the semanage command to delete the file type definition for the directory hierarchy from the file
/etc/selinux/targeted/contexts/files/file_contexts.local
:#
/usr/sbin/semanage fcontext -d "/var/webcontent(/.*)?"
Use the restorecon command to apply the default file type to the entire directory hierarchy.
#
/sbin/restorecon -R -v /var/webcontent