Posit Connect won't start - temp directory error



On a fresh installation of Posit Connect, you may see an error similar to the following:

Error: Unable to run an executable program as 'rstudio-connect' within the Server.TempDir='/tmp'; this directory may be mounted 'noexec': Unable to run validator /tmp/tempdir-validator-00000 as rstudio-connect: exit status 1

This error usually occurs when the /tmp directory is mounted as noexec.



First, you could start by remounting the tmp directory with the following command:

sudo mount -o remount,exec /tmp

From there, restart Connect so that it can see these changes:

sudo systemctl restart rstudio-connect


Alternative Solution

Failing the above, you will need to adjust the TMP directory Connect uses:

For example, with this addition below to your /etc/rstudio-connect/rstudio-connect.gcfg configuration file in the [Server] section:

TempDir = /rstudio-connect-tmp/

RStudio Connect will now use this directory below instead of/tmp:

TempDir = /rstudio-connect-tmp/

With that change, you'll also need to make the directory specified and allow access:

mkdir /rstudio-connect-tmp/
chmod 1777 /rstudio-connect-tmp/

Once complete, a restart of the Connect service is needed:

sudo systemctl restart rstudio-connect


Support Ticket

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: