-
Notifications
You must be signed in to change notification settings - Fork 62
bslib dependencies fail during file copy when installed read-only #1154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
That seems reasonable, would you like to submit a PR with the fix? |
Some follow up questions: Are you sure that the file mode attributes are the issue? Can you otherwise write files into R's temp folders on your system? |
Part of my reservation is that the files causing the warning are not copied via Lines 82 to 96 in b54bfb5
I haven't looked into It might be worth explaining your system set up so that we can recreate the environment and reproduce the issue. |
I've come across exactly the same issue. I've seen this on NixOS, where if one installs shiny or bslib using the default r$> runExample("01_hello", launch.browser = F)
Listening on http://127.0.0.1:4715
^C
r$> runExample("01_hello", launch.browser = F)
Listening on http://127.0.0.1:4715
Warning in file.copy(from, to, ...) :
problem copying /nix/store/is6v5890bp5rqv3jni0cwb3hd8x0xfpy-r-bslib-0.8.0/library/bslib/lib/bs3/assets/fonts/bootstrap/glyphicons-halflings-regular.ttf to /tmp/Rtmp0OK9Mq/bslib-precompiled-5/fonts/bootstrap/glyphicons-halflings-regular.ttf: Permission denied
Warning in file.copy(from, to, ...) :
problem copying /nix/store/is6v5890bp5rqv3jni0cwb3hd8x0xfpy-r-bslib-0.8.0/library/bslib/lib/bs3/assets/fonts/bootstrap/glyphicons-halflings-regular.eot to /tmp/Rtmp0OK9Mq/bslib-precompiled-5/fonts/bootstrap/glyphicons-halflings-regular.eot: Permission denied
Warning in file.copy(from, to, ...) :
problem copying /nix/store/is6v5890bp5rqv3jni0cwb3hd8x0xfpy-r-bslib-0.8.0/library/bslib/lib/bs3/assets/fonts/bootstrap/glyphicons-halflings-regular.woff to /tmp/Rtmp0OK9Mq/bslib-precompiled-5/fonts/bootstrap/glyphicons-halflings-regular.woff: Permission denied
Warning in file.copy(from, to, ...) :
problem copying /nix/store/is6v5890bp5rqv3jni0cwb3hd8x0xfpy-r-bslib-0.8.0/library/bslib/lib/bs3/assets/fonts/bootstrap/glyphicons-halflings-regular.svg to /tmp/Rtmp0OK9Mq/bslib-precompiled-5/fonts/bootstrap/glyphicons-halflings-regular.svg: Permission denied
Warning in file.copy(from, to, ...) :
problem copying /nix/store/is6v5890bp5rqv3jni0cwb3hd8x0xfpy-r-bslib-0.8.0/library/bslib/lib/bs3/assets/fonts/bootstrap/glyphicons-halflings-regular.woff2 to /tmp/Rtmp0OK9Mq/bslib-precompiled-5/fonts/bootstrap/glyphicons-halflings-regular.woff2: Permission denied
Warning: Error in file.copy2: Error copying files: /nix/store/is6v5890bp5rqv3jni0cwb3hd8x0xfpy-r-bslib-0.8.0/library/bslib/lib/bs3/assets/fonts/bootstrap
2: runApp
1: runExample
^C
r$> q()
rm: cannot remove '/tmp/Rtmp0OK9Mq/shiny-sassd14afa4480ae7b9cccc67f2dd193aa78/fonts/bootstrap/glyphicons-halflings-regular.woff2': Permission denied
rm: cannot remove '/tmp/Rtmp0OK9Mq/shiny-sassd14afa4480ae7b9cccc67f2dd193aa78/fonts/bootstrap/glyphicons-halflings-regular.svg': Permission denied
rm: cannot remove '/tmp/Rtmp0OK9Mq/shiny-sassd14afa4480ae7b9cccc67f2dd193aa78/fonts/bootstrap/glyphicons-halflings-regular.woff': Permission denied
rm: cannot remove '/tmp/Rtmp0OK9Mq/shiny-sassd14afa4480ae7b9cccc67f2dd193aa78/fonts/bootstrap/glyphicons-halflings-regular.eot': Permission denied
rm: cannot remove '/tmp/Rtmp0OK9Mq/shiny-sassd14afa4480ae7b9cccc67f2dd193aa78/fonts/bootstrap/glyphicons-halflings-regular.ttf': Permission denied
rm: cannot remove '/tmp/Rtmp0OK9Mq/ionRangeSlider1c599cb130648b3bc50b7e5d3e8826fb/fonts/bootstrap/glyphicons-halflings-regular.woff2': Permission denied
rm: cannot remove '/tmp/Rtmp0OK9Mq/ionRangeSlider1c599cb130648b3bc50b7e5d3e8826fb/fonts/bootstrap/glyphicons-halflings-regular.svg': Permission denied
rm: cannot remove '/tmp/Rtmp0OK9Mq/ionRangeSlider1c599cb130648b3bc50b7e5d3e8826fb/fonts/bootstrap/glyphicons-halflings-regular.woff': Permission denied
rm: cannot remove '/tmp/Rtmp0OK9Mq/ionRangeSlider1c599cb130648b3bc50b7e5d3e8826fb/fonts/bootstrap/glyphicons-halflings-regular.eot': Permission denied
rm: cannot remove '/tmp/Rtmp0OK9Mq/ionRangeSlider1c599cb130648b3bc50b7e5d3e8826fb/fonts/bootstrap/glyphicons-halflings-regular.ttf': Permission denied
rm: cannot remove '/tmp/Rtmp0OK9Mq/bslib-precompiled-5/fonts/bootstrap/glyphicons-halflings-regular.woff2': Permission denied
rm: cannot remove '/tmp/Rtmp0OK9Mq/bslib-precompiled-5/fonts/bootstrap/glyphicons-halflings-regular.svg': Permission denied
rm: cannot remove '/tmp/Rtmp0OK9Mq/bslib-precompiled-5/fonts/bootstrap/glyphicons-halflings-regular.woff': Permission denied
rm: cannot remove '/tmp/Rtmp0OK9Mq/bslib-precompiled-5/fonts/bootstrap/glyphicons-halflings-regular.eot': Permission denied
rm: cannot remove '/tmp/Rtmp0OK9Mq/bslib-precompiled-5/fonts/bootstrap/glyphicons-halflings-regular.ttf': Permission denied |
I've not tried it via changing the package. It's a bit difficult to do that in NixOS with R packages in particular. However, I've manually changed the mode to 0644 on every file in the temp directory and it's worked. |
I have a similar problem using Guix (which afaik works similar to NixOS). There packages are installed read-only, and can't be overwritten after being copied to the temp dir. My system is plain old Ubuntu, so the temp dir itself shouldn't cause issues with permissions. My errors look similar to these, only other files. |
This issue has been automatically locked. If you have found a related problem, please open a new issue (with a reproducible example or feature request) and link to this issue. |
Uh oh!
There was an error while loading. Please reload this page.
Permission denied when using precompiled css from a read-only bslib installation
In enterprise settings it is not uncommon to have a centralized library of packages where everything is installed read-only and maintained by designated users/teams. Another use case which is quickly gaining popularity is using Nix package manager for maintaining data science environments. Nix also installs everything read-only.
bslib/R/bs-dependencies.R
Line 88 in b54bfb5
One solution would be to add
copy.mode = FALSE
to thefile.copy
calls, so that the file mode attributes are not preserved.This fails in applications that call
bslib
internally, likeelmer
Added here based on the issue raised on elmer
The text was updated successfully, but these errors were encountered: