Error: Permission denied when trying to change settings

Hi,

I am having the exact problem as multiple users before me. Whenever I try to change the preferences in R Studio I get "Error: Permission denied".

E.g.

I have tried to reinstall R and R Studio multiple times, but unfortunately this does not work.

In this thread, the user found a solution by "giving permission into the .config directory under my sudo user".

However, I don't know how to do this.

Any help would be greatly appreciated, thanks!

R Studio: 1.3.1093
R: 4.0.3.
Mac Big Sur

Hi @niklbergm,
Welcome to the RStudio Community Forum.

Try running RStudio as an administrator or superuser to see if this solves the problem.

If you want to try changing the access permissions on the .config directory, then these two links provide some background and how to do it:
https://apple.stackexchange.com/questions/131482/sudo-access-to-specific-folder

And below, under section header "The Configuration Folder",
https://www.rstudio.com/blog/rstudio-1-3-preview-configuration/

If this is totally new to you, I suggest you get some local help from an experienced Mac user.

HTH

Hi @DavoWW,

thanks a lot for your input. With this help it really worked!

The only thing that still does not work is changing the "editor's theme". Whenever I change it in the preferences it works fine during the current session. But when I restart R Studio I get the "Cannot connect to R" error.

After manually deleting the "editor_theme" line in the rstudio-prefs.json file, it works again, but obviously the editor theme returns to the default.

Any idea what is causing this or to fix this issue?

Thanks
Niklas

The Cannot Connect to R message may have nothing to do with your theme, just requires a restart. We're working on that for the first 1.4 patch release.