rstudio-server cannot create .rstudio directory [System Error 13]

I have installed rstudio-server on a Centos 7 VM. When trying to access via port 8787 the login screen appears but when I attempt to log in I get:

image

I verify the install and everything is ok. Running

Blockquote sudo rstudio-server status

yields:
rstudio-server.service - RStudio Server
Loaded: loaded (/etc/systemd/system/rstudio-server.service; enabled; vendor preset: disabled)
Active: active (running) since Tue 2019-06-18 10:18:50 BST; 44min ago
Process: 22642 ExecStop=/usr/bin/killall -TERM rserver (code=exited, status=0/SUCCESS)
Process: 22677 ExecStart=/usr/lib/rstudio-server/bin/rserver (code=exited, status=0/SUCCESS)
Main PID: 22678 (rserver)
CGroup: /system.slice/rstudio-server.service
└─22678 /usr/lib/rstudio-server/bin/rserver

Plus:

: ERROR system error 13 (Permission denied) [path=/.rstudio, target-dir=]; OCCURRED AT: rstudio::core::Error rstudio::core::FilePath::createDirectory(const string&) const /var/lib/j...

So I spend a long time trawling boards researching this error. I find threads discussing PAM and apply the fixes there, basically copy the existing 'login' file to the rstudio-server file in the pam.d directory.

Still no joy. Further investigation leads me to realise that my home directory does not contain the hidden .rstudio directory. I manually create this and adjust the permissions to allow rwx for all.

I can now access and login to rstudio via port 8787! However, I cannot use the file pane to navigate directories. The top layer, ie everything in my home directory, is displayed. But if I navigate to another directory I can go inside but nothing is displayed. If I hit refresh the files and folders show for a second but disappear. Similar to this thread

I can set working directory to a non-home directory and but I cannot save a file or open a file. Creating new projects and associating them with a new or existing directory does not work, the browser simply times out. This even on directories I've changed permissions on with chmod 777.

Strangely I can read files manually from these directories with read.csv() for example. Even on via a mounted file share.

I'm new to working with a server and I do not understand if this is a permissions error or not? Surely it must be?

Any help much appreciated.

One thing perhaps worth checking: are all the parent directories also marked as readable + executable as well?

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