如何 运行 启用 SELinux 的 RStudio 服务器?

How to run RStudio Server with SELinux enabled?

RStudio 服务器在 SELinux 强制执行时无法登录用户。有一长串 SELinux 错误,开头为:

AVC avc: denied { setpgid } for pid=32444 comm="rserver" scontext=system_u:system_r:init_t:s0 tcontext=system_u:system_r:init_t:s0 tclass=process permissive=0

当 SELinux 处于宽容模式时,RStudio 服务器运行良好,尽管有很多警报:

RStudio 维护者不认为这是一个错误并关闭了 issue. Meanwhile, given how niche RStudio Server is, it might be a while before Fedora implements SELinux policy for it, though they have not rejected the request

有人 运行 RStudio Server 成功启用了 SELinux 吗?

sudo chcon -R -t bin_t /usr/lib/rstudio-server/bin/

这为二进制文件提供了正确的上下文,因为出于某种原因它们位于库目录中。

但是,此解决方案让 RStudio Server 运行 不受约束,因为尚无针对它的目标策略。