I just realized I completely misread your question :)
If you want to allow Samba to read /var/www/html
, which is httpd_sys_content_t
, you should not have a problem. I am not a Samba expert, but afaik samba runs in the smbd_t
domain, so you should be fine:
# sesearch -s smbd_t --allow | grep httpd_sys_content
allow smbd_t httpd_sys_content_t : file { ioctl read getattr lock };
allow smbd_t httpd_sys_content_t : file { ioctl read write create getattr setattr lock append unlink link rename };
allow smbd_t httpd_sys_content_t : file { ioctl read write create getattr setattr lock append unlink link rename };
allow smbd_t httpd_sys_content_t : dir { ioctl read getattr lock search };
allow smbd_t httpd_sys_content_t : dir { ioctl read write create getattr setattr lock unlink link rename add_name remove_name reparent search rmdir };
allow smbd_t httpd_sys_content_t : dir { ioctl read write create getattr setattr lock unlink link rename add_name remove_name reparent search rmdir };
That says that Samba is allowed to read httpd_sys_content_t
directories and files. The /var/www/html
tree is httpd_sys_content_t
. Have you tried this already?