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 installed monit for many applications with the root user. One of the applications is started with a non-root user account.

Unfortunately, when I update my app, I also need to restart it. My update process uses the non-root user (I use capistrano to udpate my app)

Since Monit is checking this app and the update process is done with the non-root user. In order to restart the app, the non-root user kills the app and monit restarts it.

I would like to allow the non-root user to be allowed to only restart this specific app. This user shouldn't be aloud to run other monit related actions.

Is there a way to allow a user run a specific monit action, even if he is not the owner of the monitrc ?

share|improve this question
If you want to allow a non-root user to execute privileged command, you can use sudoers file. – Khaled Jan 21 '13 at 8:19
Is their a way to achieve this using monit config instead ? – Raphael Jan 22 '13 at 9:59
up vote 4 down vote accepted

Add an entry to /etc/sudoers...

%non-root-group ALL=NOPASSWD:/usr/bin/monit 


non-root-user ALL=NOPASSWD:/usr/bin/monit 


non-root-user ALL=NOPASSWD:/usr/bin/monit reload # to give a specific Monit command.
share|improve this answer
Is their a way to achieve this using monit config instead ? – Raphael Jan 22 '13 at 9:58
Finally granted my user this privilege, but I am still looking for a way to achieve this from a monit config point – Raphael Jan 27 '13 at 19:39

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.