monit:控件文件'/ etc / monit / monitrc'必须归您所有

时间:2017-04-24 09:42:20

标签: ruby-on-rails ubuntu monit

我在monitrc中访问了以下详细信息:

set httpd port 2812 and
    use address localhost  # only accept connection from localhost
    allow 0.0.0.0/0.0.0.0
#    allow admin:monit      # require user 'admin' with password 'monit'

   allow @mygroup

1 个答案:

答案 0 :(得分:0)

Monit的源文件p.y中的某处有一些代码,它用以下注释检查monitrc

/*
 * Secure check the monitrc file. The run control file must have the
 * same uid as the REAL uid of this process, it must have permissions
 * no greater than 700 and it must not be a symbolic link.
 */

此检查生成了消息The control file '/etc/monit/monitrc' must be owned by you。要解决此问题,您需要更改monitrc文件所有者或运行Monit守护程序的用户,以使它们相同。

这也来自Monit documentation

为保护您的控制文件和密码的安全性,控制 文件的读写权限不得超过0700(u = xrw,g =,o =); Monit会抱怨,否则退出。