Page 1 of 1

SELinux: Add exception to path /var/www/html

Posted: 2023 May 03, 22:34
by Mihai
Add SELinux permissions to path /var/www/html

Code: Select all

[root @ CentOS ~]$ semanage fcontext -a -t httpd_sys_rw_content_t "/var/www/html(/.*)?"
[root @ CentOS ~]$ restorecon -R /var/www/html
Check for permissions

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