RStudio server not starting on RedHat 8 with SELINUX security policy in 'enforced' mode

This issue with SELinux is present in RHEL8.
$ rstudio-server version
1.3.1093-1 Professional (Apricot Nasturtium) for CentOS 8

$ R --version | grep "R version"
R version 4.0.0 (2020-04-24) -- "Arbor Day"

$ cat /etc/redhat-release
Red Hat Enterprise Linux release 8.3 (Ootpa)

At present the only workaround is to disable SELinux. But from security perspective it's highly needed for SELINUX to be enabled.
Could someone help us on this problem.

RStudio Server Pro does not work out of the box on a system with SELinux enabled. A pragmatic solution is to grant the blocked applications more permissions.

First disable SELinux and restart RStudio Server

sudo setenforce 0
sudo rstudio-server restart

Login to RStudio Server, create a session, do something in R, ...
List all the things that would have been blocked:

sudo sealert -l "*"

Typically rserver , rstudio-launcher and rworkspace cause problems, but there might be others as well. Easiest solution is to allow everything that has been blocked, e.g.

sudo ausearch -c 'rserver-launche' --raw | audit2allow -M my-rserverlaunche
sudo semodule -i my-rserverlaunche.pp

These commands are also listed in the output of sealert . Sometimes you have to repreat this multiple times. Using

sudo semodule -l

you can check that the correct policy is installed.

Finally re-enable SELinux and restart RStudio Server

sudo setenforce 1
sudo rstudio-server restart

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.