1

I need to give permission to a user to start, stop and restart Rstudio's shiny-server.

Right now, I have been managing the service upon this user's request with sudo service restart shiny-server, but now I want the user to manage this.

My first approach to this problem is to edit the /etc/sudoers. But I realized I have no idea what the full path of shiny-server is, so I have no idea what to put in the /etc/sudoers file. I would have hoped to find it in /etc/init.d/, but that isn't the case.

Does anyone have experience with this or a work-around?

I'm currently running Ubuntu 16.04.5 LTS (Xenial Xerus) on this server.

The version of R is 3.4.1 and it was compiled from source.

  • Did my solution work for you? If you're getting an error then can your run the command which service and tell me the result. I can then update my answer to make sure it works. – Crypteya Jan 30 at 1:35
  • 1
    This solution does work and my user is happy now! Thank you for your help. – papermachine Jan 30 at 22:34
1

You probably don't need the filepath for shiny-server.

You should be able to give the user the required permissions by adding the following line to your /etc/sudoers file:

username ALL=(root) service restart shiny-server, service stop shiny-server, service start shiny-server

After adding that line, the other user should be able to run sudo service restart shiny-server (as well as start/stop. If you're intent on finding the init script locations, the normal locations to look are:

/etc/init
/etc/init.d
/etc/init/rc-sysinit.conf
/etc/default

(found via this question)

  • You would need the path for service to be listed , eg /sbin/service. – Stephen Harris Jan 25 at 2:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.