When RStudio Connect is installed, there is a "secret key" that is also installed in the background which is used for encrypted communication between the database and the application server. One half of this key is sent to the hard disk of your RStudio Connect application server, and the other half is sent to your database.
When the database and the application server communicate, this key is checked to ensure that data is being sent to the correct place, as well as encrypted while in transit. If the key matches, then data is able to traverse between the RStudio Connect application server and the database.
If the key's permissions are too restricted, or adversely, too unrestricted, then Connect will fail to start and you may see an error such as the below:
level=fatal msg="Error: Unable to apply the configuration: Encryption key file mode must be 0600: /var/lib/rstudio-connect/db/secret.key
First, you will need to ensure that the
/var/lib/rstudio-connect/db/secret.key file has 600 permissions. You can run the following command on the server:
chmod 600 /var/lib/rstudio-connect/db/secret.key
Note that the
/var/lib/rstudio-connect/db/secret.key directory is the default. Your
secret.key file may be stored elsewhere. From there, restart the Connect service:
sudo systemctl restart rstudio-connect
If you still have issues after completing the above, you can always lodge a support ticket, where our group of friendly, and incredibly knowledgeable staff can assist with any issues that you may be having. You can submit a ticket here: