0

In RStudio Server I want to write to the directory /var/www/r_diagnostics:

f <- "/var/www/r_diagnostics/test.txt"
writeLines("test", con = f)

The name of my user is randomuser.

> system("whoami")
randomuser

The directory permissions for r_diagnostics are set as:

drwxrwxrwx  2 randomuser randomuser   4096  6. Jan 18:15 r_diagnostics

What can I do about it?

Mark Heckmann
  • 10,943
  • 4
  • 56
  • 88

1 Answers1

2

To write a file, you have to find the directory. This requires execute permission for each element in the path. Execute permission allows you to find a directory's contents.

Plus, you also need write permission to the final leaf directory in order to modify a file (you had that already).

Matthew Lundberg
  • 42,009
  • 6
  • 90
  • 112