I'm trying to overwrite default rule for public_html directory:
/home/[^/]*/((www)|(web)|(public_html))(/.+)? unconfined_u:object_r:httpd_user_content_t:s0
Assigning the httpd_user_rw_content_t context
I tried to add another rule for the same path with:
semanage fcontext -a -t httpd_user_rw_content_t "/home/[^/]*/((www)|(web)|(public_html))(/.+)?"
But restorecon -R /home/user/public_html
still assign httpd_user_content_t context.
Is there a way to overwrite the default rule? (Edit file_contexts.homedirs doesn't looks a good idea...)
0 Answers