Restoring the Default File Type

The following steps restore the default file type of the directory hierarchy /var/webcontent that has the httpd_sys_content_t setting:
  1. 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:

    sudo /usr/sbin/semanage fcontext -d "/var/webcontent(/.*)?"
  2. Use the restorecon command to apply the default file type to the entire directory hierarchy.
    sudo /sbin/restorecon -R -v /var/webcontent