If, like me, you're having trouble running RStudio on macOS Tahoe, just follow these steps:
Problem
When launching the RStudio binary directly from the terminal:
/Applications/RStudio.app/Contents/MacOS/RStudio
The following error appears:
Error: EACCES: permission denied, mkdir '/Users/USERNAME/.local/share/rstudio/log'
Cause
The ~/.local directory is owned by root, preventing the current user from creating subdirectories.
Check with:
ls -ld ~/.local
If it shows:
drwxr-xr-x root staff ...
then this is the issue.
This usually happens if a previous command was executed with sudo, which created .local as root.
Solution
Fix ownership:
sudo chown -R $(whoami):staff ~/.local
Fix permissions:
chmod -R 755 ~/.local
After that, RStudio should start normally.