See the solution below in Explanation. Explanation: Solution: mkdir -p /webdata semanage fcontext -a -t httpd_sys_content_t "/webdata(/.*)?" restorecon -Rv /webdata ls -Zd /webdata Detailed Explanation: * semanage fcontext defines a persistent SELinux file-context rule. * restorecon applies the correct labels to the directory and contents. * httpd_sys_content_t is the standard read-only content type for Apache. * RHEL 10 SELinux documentation covers persistent labeling with semanage and applying labels with restorecon. ( Red Hat Documentation )