SELinux: httpd_sys_content_t vs httpd_sys_content_rw_t

  • Allow webserver to add attributes to files on the web content.

By default anything on the webroot(/var/www/html) is labelled as httpd_sys_content_t. Problem comes in when the webserver needs to set attributes to items inside this folder.

Solution: relabel them to httpd_sys_content_rw_t.
$ chcon -Rv --type=httpd_sys_content_rw_t /var/www/html/path

Add Comment

Sorry you must log in first to be able to add a comment. Click here to log in.