RStudio Server Linux - file permissions

Hi,

I need that the files saved with RStudio (v. 1.2.1335, CentOS 7) have 664 permissions.
I tried to set umask 002 at system level (/etc/profile) and setting server-set-umask=0 in /etc/rstudio/rserver.conf but the file permission is still 644.
Ther's a way to do that?
Thanks.

Beppe

I had a simlar need (RStudio Server 1.4, Ubuntu 20.04), and was able to get the desired result by adding UMask to the systemd service file.

For my Ubuntu system, I did:

sed -i 's/Type=.*/&\nUMask=0002/' /lib/systemd/system/rstudio-server.service

I think the service files on Centos will be under /usr/lib/systemd, so make sure you're looking at the right file, and you might want to hand edit to be safe, in case the layout isn't the same. I don't have a Centos system handy to check.

Thank you Steve.
In summary, this is what I did:

  • modified /etc/rstudio/rserver.conf adding server-set-umask=0
  • sed -i 's/Type=.*/&\nUMask=0002/' /etc/systemd/system/rstudio-server.service