I'm an Ubuntu/Debian guy but I had trouble installing Ubuntu on a softraid/fakeraid system, so I went with CentOS 5.6.
I'm also at a small web development firm where we need to share our test server's html/httpd files via samba/smb but also allow apache to host them.
So I'm wondering if I can set our files to the samba and httpd type?
Something like,
/usr/sbin/semanage fcontext -a -t samba_share_t,httpd_sys_content_t "/var/www/html(/.*)?"
Or else I'm going to have to turn SELinux into permissive mode, which is not something I want to do.
Best Answer
I just realized I completely misread your question :)
If you want to allow Samba to read
/var/www/html
, which ishttpd_sys_content_t
, you should not have a problem. I am not a Samba expert, but afaik samba runs in thesmbd_t
domain, so you should be fine:That says that Samba is allowed to read
httpd_sys_content_t
directories and files. The/var/www/html
tree ishttpd_sys_content_t
. Have you tried this already?