rstudio on Windows 10 - while saving any type of file, i get “file not found ” and permissions are not the issue

I have a weird problem where Rstudio can no longer save to any folder other than the parent folder (that includes none of its sub-directories, such as documents or documents/R )

I get a "file not found" error

here's what i do know and tried

  • I didn't do anything with Rstudio prior to the problem starting.
  • I tried updating to the latest version - 1.2.1335
  • I tried uninstalling and reinstalling the latest version. still have this problem
  • Permissions-wise - I have Full Control - every permission as both the user and as an administrator and i tried saving various types of files when running as both of them.
  • the parent folder of \documents\ , that is the main folder is the only one that works, and i have the Full control. C:\ doesn't work because i don't have permission (As the user).

I also tried the following in Powershell as admin

  • attrib -r +s C:\Users\Documents\ /s /d - "file not Found"
  • attrib -r +s C:\Users\Ehrlichstein\Documents\R /s /d "Access Denied" (Also for all subfolders)

I looked for solutions on superuser (https://superuser.com/questions/274943/attrib-s-r-c-folder-path-d-s-just-wont-work) and in windows 10 official discussion, and in Rstudio archived support and I couldn't find an answer that worked.

I run Windows Version 10.0.17134 Build 17134 and R studio Version 1.2.1335

any help would be appreciated. thanks !

EDIT

R session info: R version 3.5.2 (2018-12-20) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 17134)

Matrix products: default

locale:

LC_COLLATE=English_United States.1252 [2] LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252 [4] LC_NUMERIC=C
[5] LC_TIME=English_United States.1252

attached base packages:
stats graphics grDevices utils datasets [6] methods base

loaded via a namespace (and not attached): compiler_3.5.2 htmltools_0.3.6 tools_3.5.2
[4] yaml_2.2.0 Rcpp_1.0.0 rmarkdown_1.11 [7] knitr_1.21 xfun_0.4 digest_0.6.18
[10] evaluate_0.13

I also posted a question on superuser

Update: tried following this suggestion
" This certainly appears to be a permissions issue. When I have something similar I usually give access to everyone and then remove users/groups to see where it breaks again. Giving access to everyone can be a little heavy handed though, especially if you are not familiar. Here are two options, the first will be lighter and the second heavy.

First, from an elevated CMD prompt, run this:

icacls "C:\Users\Ehrlichstein\Documents" /grant Ehrlichstein:(OI)(CI)F /T

(Substitute your actual user name if it is different)

Second, the heavier approach, is to grant Everyone access:

icacls "C:\Users\Ehrlichstein\Documents" /grant Everyone:(OI)(CI)F /T

This unfortunately didn't work, and i got an "access is denied" message

Still no idea what to do. anyone ?

finally solved it via Controlled Folder Access, which blocked both r and Rstudio. I added 3 exceptions via the "Allowed Apps" setting (open the Start button and search for Allowed Apps or Allow an app through controlled folder access):

  • rstudio.exe , C:\program files\Rstudio\bin
  • R.exe, C:\program files\R\R-3.6.0\bin
  • rsession.exe , C:\program files\Rstudio\bin
1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.