If you’re an R/RStudio user who has migrated to Mojave (macOS 10.14) or are contemplating migrating to it, you will likely eventually run into an issue where you’re trying to access resources that are in Apple’s new hardened filesystem sandboxes.
Rather than reinvent the wheel by blathering about what that means, give these links a visit if you want more background info:
- Mojave’s privacy protection is complex and will crash innocent apps
- Working with Mojave’s Privacy Protection
- Managing Mojave’s privacy protection: Privacy controls
and/or Google/DuckDuckGo for
macos privacy tcc full disk access as there have been a ton of blogs on this topic.
The TLDR for getting your R/RStudio bits to work in these sandboxed areas is to gran them “Full Disk Access” (if that sounds scary, it is) permissions. You can do that by adding both the R executable and RStudio executable (drag their icons) to the
Full Disk Access pane under the
Privacy tab of
System Preferences =>
Security & Privacy:
I also use the Finder’s “Go To” command to head on over
/usr/local/bin and use the “Show Original” popup on both
Rscript and dragged their fully qualified path binaries into the pane as well (you can’t see them b/c the pane is far too small). The symbolic links might be sufficient, but I’ve been running this way since the betas and just re-drag the versioned R/Rscript binaries each time I upgrade (or rebuild) R.
If you do grant FDA to R/RStudio just make sure be even more careful about trusting R code you run from the internet or R packages you install from untrusted sources (like GitHub) since R/RStudio are now potential choice conduits for malicious code that wants to get at your seekret things.
Photo by Alexander Dummer on Unsplash
*** This is a Security Bloggers Network syndicated blog from rud.is authored by hrbrmstr. Read the original post at: https://rud.is/b/2018/11/09/escaping-the-macos-10-14-mojave-sandbox-with-r-rstudio/