|
From: | Stephen Butler |
Subject: | /etc/monitrc Ownership issues |
Date: | Tue, 23 Apr 2013 03:02:02 +0000 |
Hi all,
Here's a sample of a /etc/monitrc config file of mine. ------------------------------------------------------ set daemon 10 # check services at 10 second intervals set logfile syslog facility log_daemon set httpd port 2812 and use address 10.1.1.150 # only accept connection from localhost allow 0.0.0.0/0.0.0.0 # allow localhost to connect to the server and allow admin:monit # require user 'admin' with password 'monit' check process smbd with pidfile /var/run/smbd.pid start program = "/usr/local/etc/init.d/samba start" stop program = "/usr/local/etc/init.d/samba stop" check process sshd with pidfile /var/run/sshd.pid start program = "/usr/local/etc/init.d/openssh start" stop program = "/usr/local/etc/init.d/openssh stop" ------------------------------------------------------ If I start monit with this file, i get the following errors. /etc/monitrc:11: Warning: Program is not executable: '/usr/local/etc/init.d/samba' /etc/monitrc:12: Warning: Program is not executable: '/usr/local/etc/init.d/samba' So I had a look and the /usr/local/etc/init.d/samba file has ownership root.root And the /usr/local/etc/init.d/samba file has permissions of -rwxr-xr-- my /etc/monitrc file has ownership tc.staff and I run monit as my standard tc user. I get around this by running 'sudo monit' to start monit and no more problems. I guess I could change permissions of the /usr/local/etc/init.d/samba, or change its ownership to root.staff I would really appreciate some advice on the best way to go forward with this. Thanks, Stephen. |
[Prev in Thread] | Current Thread | [Next in Thread] |