Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have set up supervisor to monitor some processes. Because I deploy via remote script, I need a way to send supervisor start/stop commands without sudo. I'm not sure how to do this though.

Is there a way in supervisor to run specified commands as a non root user?

share|improve this question
up vote 2 down vote accepted

The supervisorctl command can be run as a non-root user. All you need to do is give it permission to connect to the supervisord process.

You'll need to configure access in the appropriate server section, so in the [unix_http_server] section, or in the [inet_http_server] section, whichever you are using for your supervisord setup.

If you use the [unix_http_server] setup, you'd add chmod and/or chown directives to control who can access the UNIX domain socket, for example:

chown = youruser

so that youruser can write to that socket, which means supervisorctl can send supervisord commands. You can also add a group:

chown = youruser:yourgroup
share|improve this answer
Thanks, also I tried to define a process group but supervisor isn't seeing it, even after a restart of supervisord itself. Is there some config I'm missing other than a [group:x] with programs & priority defined? – user1561108 Dec 1 '12 at 20:20
@user1561108: You mean you added a [group:groupname] section and after a restart you don't see that added? [group:] sections don't specify permissions to access it, only an easy way to address a whole group of programs (to restart them together, for example), so I am a little confused if this still applies to your original question. – Martijn Pieters Dec 1 '12 at 21:08

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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