Unable to use ${USER} variable in default working dir configuration (rsession.conf)

Hello RStudio Community,

R version 3.5.2 (2018-12-20)
RStudio (free) version 1.1.463
RHEL 7.6

I'm trying to use following configuration in rsession.conf to set the default working directory:


After restart of rstudio-server service and restart of my session I can see that I'm still working in originally set '~' location.

When I've tried to change this to:


it was working without any issues, but of course only for my user/dir.

Log from journalctl:

May 21 14:13:02 hostname.local rsession-domain_account[60269]: ERROR system error 13 (Permission denied) [path=/data/${USER}/, target-dir=]; OCCURRED AT: rstudio::core::Error rstudio::core::FilePath::createDirectory(const std::string&) const /root/rstudio/src/cpp/core/FilePath.cpp:846; LOGGED FROM: void rstudio::session::::ensureDefaultDirectory(std::string*, const std::string&) /root/rstudio/src/cpp/session/SessionOptions.cpp:66

My user is the owner of the /data/username/ dir with rwx rights.

I'm trying to set this up, because multiple users will be working on this server and I would like to separate their workspaces. If there's any other way - I'm open to suggestions.

I'm also quite new to RStudio, so I do apologize in advance if I'm making some newbie mistake.

Thank you all for help.


To the best of my knowledge, we don't try to expand environment variables used in these configuration options. Why don't you want to use the user's default home directory?

One of the users was trying to first copy his data to /home and hitting the issue with no free space available (/home being much smaller than /data in our server).

If there's no other way, we will instruct users to use ~ only for their scripts and /data/username for their analysis data.

Thank you for quick reply.

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