Code: Select all
[root @ CentOS ~]$ semanage fcontext -a -t httpd_sys_rw_content_t "/var/www/html(/.*)?"
[root @ CentOS ~]$ restorecon -R /var/www/html
Code: Select all
[root @ CentOS ~]$ ls -lZ /var/www/
drwxr-xr-x. root root system_u:object_r:httpd_sys_rw_content_t:s0 html