【问题标题】:monit: The control file '/etc/monit/monitrc' must be owned by youmonit:控制文件'/etc/monit/monitrc'必须归你所有
【发布时间】:2017-04-24 09:42:19
【问题描述】:
我有以下详细信息可以在 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
【问题讨论】:
标签:
ruby-on-rails
ubuntu
monit
【解决方案1】:
在 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 会抱怨并退出。