Failure to start a child R process via callr, caused by Windows-level file / execution permissions

Firstly, I’d like to apologies as I’m not technical, just relaying an issue that our end-user is having.

Background
I work as a help desk guy in an organisation. We have a locked‑down analytics environment designed to protect sensitive data while still allowing approved users to work with it. It is a Citrix‑hosted virtual desktop used by multiple authorised users.

Incident Details
One of our external users is having an issue while running a package in RStudio:
I’m currently experiencing some permissions-related issues on your org's machine.
This seemed to be working last week but I can’t get it to work for me now.
When I try to run the targets pipeline, I get this error message: (see pic 1)

It seems to be a permissions issue when callr starts an R process. I am able to load the callr library but whenever I try to use it, it throws this same error.
(see pic 2)

According to Copilot, it may be an Antivirus / endpoint protection update or Temp directory permissions changed.

Our IT is managed by a 3rd party managed service provider, and they responded: “contact the vendor. If the application is using the user's temp directory, then user has full rights to their own temp directory. If it is AV, then the exclusions need to be supplied by the vendor.”.

Unfortunately, we don’t have a vendor, as we use the free version of R heh. So turning to strangers online for assistance!

The end-user tried this script:

dir.create("C:/R/tmp", recursive = TRUE, showWarnings = FALSE)

Sys.setenv(TMPDIR = "C:/R/tmp")

callr::r(function() 1)

And provided the below response:

When I try that code, I get the following (similar) error:
(see pic 3)

You’re right, I think it’s because I don’t have permissions to use C:/. For example, if I try to install into the R library here, I get this message:

Does anyone have any suggestions for either the end-user or my IT department on how to proceed? Any help would be much appreciated!

3 screenshots:

Seems like you are not allowed to load a DLL file from the user's temporary directory. Where are the user's (?) R packages installed? You can probably run

find.package("callr")

to see where it is installed to. If the user has write access to this directory, then they could create a temporary directory there, and point TMPDIR there.

1 Like

This topic was automatically closed 7 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.