my-awesome-user ALL=NOPASSWD: /path/my_cmd
my_cmd
#!/bin/bash
/usr/bin/supervisorctl restart
assuming restart is the right keyword, I don't use supervisor but systemctl
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I currently have this in /etc/sudoers:
my-awesome-user ALL=NOPASSWD: /usr/bin/supervisorctl
However, this allows the user to restart, stop, start, reload ANY worker, I would like to only allow the user to restart a specific worker?
How can this be achieved?
Please or to participate in this conversation.