SELinux:如何允许 apache、samba 和 tomcat 访问同一文件

car*_*est 5 httpd selinux tomcat7

运行红帽 7.4

直到最近我可以使用

semanage fcontext -a -t public_content_rw_t '/var/www(/.*)?'
restorecon -R /var/www
Run Code Online (Sandbox Code Playgroud)

来自回答https://serverfault.com/a/346779/125461 关于如何让 SELinux 允许 Apache 和 Samba 在同一文件夹中?.

但 public_content_rw_t 不再适用于 tomcat (tomcat-7.0.76-2.el7.noarch)

我设法通过使用解决了这个问题

semanage permissive -a tomcat_t 
Run Code Online (Sandbox Code Playgroud)

但我正在寻找一个允许 tomcat & httpd 读取和 samba 读取和写入的上下文,或者一个允许 rw to tomcat、httpd & samba 的上下文。

或者,是否可以将 tomcat 使用的上下文更改为 httpd 上下文?