Error: Permission denied when trying to change settings


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".


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:

And below, under section header "The Configuration Folder",

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


1 Like

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.Bildschirmfoto 2021-01-05 um 14.08.54

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


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.

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.

1 Like