Unable to login to rstudio-server started by another user that is not a root user in a docker container.

Hello,

I am trying to create multiple users and start rstudio-server using one of them.

The issue that I am facing is that when I provide the correct credentials for any of the users, I am redirected back to the login page without any error and needless to say, i am not able to login. The incorrect credentials prevent login as expected with the error message.

I have done the following things in my docker file:

  1. Built and installed required version of R with --enable-R-shlib.
  2. Downloaded rstudio-server community edition.
  3. Installed initscripts
  4. Installed rstudio-server community edition.
  5. Set permissions to /etc/shadow to 644 (Read that in a forum)
  6. Created required users using useradd.
  7. Created required directories and set the group of all users as that of the user that is used to start rstudio-server. Also, just so I could rule out any permission issues, set 777 permissions to all users recursively.
  8. Copied /etc/pam.d/login to /etc/pam.d/rstudio (Read that in a forum)
  9. Set the user as the one to be used to start rstudio-server.
  10. Started server with --server-deamonize set to off. (Read that in a forum. Also tried without this and also with setting this to 0.)

I am also unable to see the logs. To check for the same I tried the following:

  1. Check for /var/log/messages turns out, it doesnt exist.
  2. Tried journalctl -u rstudio-server and journalctl -f still nothing.
  3. Also searched for /var/lib/rstudio-server/monitor/log/rstudio-server.log unable to find the same.

Since I am unable to find the logs, I am not able to narrow down where the problem is.

Where could I be going wrong?

Regards,
Pulah

That is not possible. RStudio Server has to be started by root. Otherwise it cannot start the R session with the rights of the logged in user, c.f. https://docs.rstudio.com/ide/server-pro/access-and-security.html#server-permissions

1 Like

@rstub thanks for pointing that out.

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