Privileged Ports in RStudio Package Manager


RStudio Package Manager listens on HTTP port 4242 by default. When you modify the HTTP.Listen or HTTPS.Listen configuration properties to use a privileged port under 1024, the service will fail to start, and you will see an error like the following in `/var/log/rstudio-pm.log:

2017/11/28 13:41:59 Error: Could not initialize the HTTP listener: listen tcp :80: bind: permission denied

If you wish to listen with HTTP or HTTPS on a privileged port (< 1024), you can grant the RStudio Package Manager binary permission to do so by issuing the following command as root:

sudo setcap 'cap_net_bind_service=+ep' /opt/rstudio-pm/bin/rstudio-pm

After issuing the above command, restart the service (see Section 5.1 of the admin guide).