Open peterwolf4 opened 4 months ago
I can't reproduce.
@eitsupi Good for you, I would also love that haha Really not sure though how there can be differences within the same image :/ To me it seems like then it must be some systemwide user config that interferes within dockre users? But this would only make sense if I had issues under R 4.3.3 as well, which I don't... Really no clue where it is coming, esp. since it seems to be version specific for above 4.4.x... I included the log of a run exactly how you performed it, with the same error (I know hard to debug when its impossible to reproduce on your end but I am out of guesses as to why I am seeing this error, especially since we are inside a container!)
Rstudio:
docker run --rm -it --user rstudio rocker/rstudio:latest bash
Unable to find image 'rocker/rstudio:latest' locally
latest: Pulling from rocker/rstudio
Digest: sha256:f5c8b1c2817860fcefd3105c92c60bedb1fbcb76093f0783345e9e4379c2bad4
Status: Downloaded newer image for rocker/rstudio:latest
rstudio@0746a5cd5a4f:/$ R
R version 4.4.1 (2024-06-14) -- "Race for Your Life"
Copyright (C) 2024 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
Natural language support but running in an English locale
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> q()
rstudio@0746a5cd5a4f:/$ ll /usr/local/lib/R/site-library/
ls: cannot open directory '/usr/local/lib/R/site-library/': Permission denied
And second, same with Tidyverse:
docker run --rm -it --user rstudio rocker/tidyverse:latest bash
Unable to find image 'rocker/tidyverse:latest' locally
latest: Pulling from rocker/tidyverse
Digest: sha256:6201884679072727ce627102ee636c64c51b4dc2dcfb376f2b03105505da9d6f
Status: Downloaded newer image for rocker/tidyverse:latest
rstudio@9cf612317dc4:/$ ll /usr/local/lib/R/site-library/
ls: cannot open directory '/usr/local/lib/R/site-library/': Permission denied
Container image name
rocker/rstudio:4.4.1
Container image digest
rocker/rstudio@sha256:f5c8b1c2817860fcefd3105c92c60bedb1fbcb76093f0783345e9e4379c2bad4
What operating system are you seeing the problem on?
Linux
System information
Bug description
We use Rserver instances as reproducible environment for R&D, but since a new package requires a switch to 4.4.1 I have not been able to get the previous functionality and cannot seem to find anyone who shares the problem.
Working (Minimal) Setup:
Now when I update to the recent version of R 4.4.1 all packages install fine during build time. However, when I run the container all packages installed during build (and also preinstalled ones such as the ones included in the tidyverse container) won't be available. Here I emulate the Rserver user that users would usually use through the webbrowser frontent by directly logging into a bash sessions as rstudio user (This (should always) yield the same outputs as when a user tries to navigate the files from within the Rstudio terminal in the webbrowser, where the same permission denied error occurs when trying to open site-library.):
I was able to find out that the cause is a permission error to access /usr/local/lib/R/site-library however, chanigng the permission does not resolve the issue!; Neither should it persist in the first place since read and execute is set allowed for all users. When logging in as root to remove the staff usergroup it works again, eg. to root:root :
At this stage we can see cowplot in autocomplete again when calling library() in the Rstudio IDE, however when loading the package it will error because the underlying directory is still owned by staff.
Hence I'll need to completely purge staff usergroup out of the 4.4.1 site-library install directories to fix the installed R packages.
root@febff26b4a43:/# chown root:root -R /usr/local/lib/R/site-library/
For now I will bypass this issue by including the purge fix into the dockerfile like so:
Does anyone got a clue where this staff permission error originates from? Afterall, both versions build from the same install scripts and it feels very unsatisfying to recursively own filetrees.
1) I could not figure out how there can be a change to the staff group between something as R version increments? 2) What would trigger permission errors despite the folder clearly allowing for read access to all users, let alone if the user is part of the same group that is triggering the permission errors in the first place?
Bootup and install logs etc all look fine, looking forward to hear your thoughts and ideas to narrow down the root cause of this issue! Thanks for your time and the great maintenance!
How to reproduce this bug?