when I test the nagios at the first time,I met the problem ,the message is :
can't open the file which needs updates.The rights of external commands file or directory is incorrect,set up the correct rights according to the FAQ.
Then I find a article about how to solve the problem.
I change the rights of the file “/usr/local/nagios/var/rw/nagios.cmd”.Add the write rights on the file.then the problem disappeared.
It's a special file and wired.I can't open it. and this guy said it could't be copied.If it is not exist,you create it by yourself.
 
用命名管道由命令 mkfifo创建一个文件。
mkfifo  nagios.cmd
创建之后文件默认属性为prw-r--r--
更改其所属用户与组都为nagios
chown –R nagios:nagios  /usr/local/nagios/var/rw/nagios.cmd
更改其属性为prw-rw----
Chgrp g+w /usr/local/nagios/var/rw/nagios.cmd
Chmod o+w /usr/local/nagios/var/rw/nagios.cmd
 
尝试使用外部命令时候还会出现权限错误,这时再给其他用户写权限。即为prw-rw--w--