Permissions related to upgrade to RStudio Server Open Source 1.4

I've been successfully running RStudio 1.3.1093 with S6 v2.0.0.1 in the rocker/rstudio:4.0.2 docker container on our compute cluster (where I have no permissions for root or userid/jobid modification). However, with the upgrade to RStudio 1.4.1103 and S6 v2.1.0.2 in the rocker/rstudio:4.0.3 container, I can only run R and can no longer run Rstudio. The installer scripts are otherwise unchanged; has there been an additional permissions requirement with the version upgrade? If this is the source of my error, can I modify these requirements in the installer script in order to run without root/user/job modification permissions?

4.0.3: Pulling from rocker/rstudio
Digest: sha256:6587343e957c4f215be7226412c4cb92d5ea31d2048bbd592b7d5cfa32f13eab
Status: Image is up to date for rocker/rstudio:4.0.3
docker.io/rocker/rstudio:4.0.3
koetjen@compute1-exec-211:~$ rstudio-server verify-installation
26 Jan 2021 01:56:52 [rserver] ERROR database error 7 (sqlite3_statement_backend::loadOne: attempt to write a readonly database) [description: Could not delete expired revoked cookies from the database, description: Could not read revoked cookies from the database]; OCCURRED AT virtual rstudio::core::Error rstudio::core::database::Connection::execute(rstudio::core::database::Query&, bool*) src/cpp/core/Database.cpp:480; LOGGED FROM: int main(int, char* const*) src/cpp/server/ServerMain.cpp:729
$ /init 
[s6-init] making user provided files available at /var/run/s6/etc...exited 0. [s6-init] ensuring user provided files have correct perms...s6-chown: fatal: unable to chown /var/run/s6/etc/cont-init.d/userconf: Operation not permitted s6-chmod: fatal: unable to change mode of /var/run/s6/etc/cont-init.d/userconf: Operation not permitted s6-chown: fatal: unable to chown /var/run/s6/etc/services.d/rstudio/run: Operation not permitted s6-chmod: fatal: unable to change mode of /var/run/s6/etc/services.d/rstudio/run: Operation not permitted s6-chown: fatal: unable to chown /var/run/s6/etc/services.d/rstudio/finish: Operation not permitted s6-chmod: fatal: unable to change mode of /var/run/s6/etc/services.d/rstudio/finish: Operation not permitted exited 0. [fix-attrs.d] applying ownership & permissions fixes... [fix-attrs.d] done. [cont-init.d] executing container initialization scripts... [cont-init.d] userconf: executing... /var/run/s6/etc/cont-init.d/userconf: line 12: /usr/local/lib/R/etc/Renviron: Permission denied deleting user rstudio userdel: user 'rstudio' does not exist```

There is https://github.com/rocker-org/rocker-versioned2/issues/105, which I think you also created. Since this issue is specific to RStudio Server as used within the rocker container, I think the topic should be discussed there.

Thanks for taking the time to reply. Hopefully there will be a solution that can be workable for rocker containers for those of us with limited permissions.

In the meantime, I have been modifying my installation scripts for RStudio. Unfortunately I have not been able to identify the changes I need to make after the upgrade in RStudio 1.4 to adjust the permissions required. If anyone is familiar with where I can find these installation instructions in the RStudio documentation, would be much appreciated :slight_smile:

I've found this works. Give it a shot.

 rm /var/lib/rstudio-server/rstudio.sqlite 
 chmod -R g=u /var/lib/rstudio-server

You might also want to do this:

chmod -R g=u /etc/rstudio

Basically you need to give your Docker user permission to write to that /var/lib/rstudio-server directory. And you could in theory just change permissions on the initial sqlite database, I just removed it and that worked fine.

Note that the above assumes that your Docker container is running as GID 0, which is pretty standard. It doesn't require running as a particular UID.

I found that just changing the ownership of the created sqlite database works too:

chown -R root:root /var/lib/rstudio-server
chmod -R g=u /var/lib/rstudio-server

I am running into the same issue as @koetjen, running the image with singularity on a HPC. I am thus unable to make the changes @mcg suggested since they require root privileges.

1 Like

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.