我有一个脚本可以检查Nagios中的日志模式。当我通过nagios用户运行相同的时候,它会给我一个错误
“远程命令执行失败:stat:无法统计`/home/tomcat/services/abcd-1.23.123/logs/abcd-abcd.log':权限被拒绝”
这是脚本的调试信息。任何解决方案?
:: / usr / local / nagios / check_hierfetcherlog.sh:44 + stat -c%s /home/tomcat/services/abcd-1.23.123/logs/abcd-abcd.log stat:无法统计`/home/tomcat/services/abcd-1.23.123/logs/abcd-abcd.log':权限被拒绝
以下是上述路径的权限
/home - drwx------ 18 tomcat tomcat 4096 Oct 27 16:25 tomcat
/home/tomcat - drwxr-xr-x 61 tomcat tomcat 4096 Oct 27 14:55 services
/home/tomcat/services/ - drwxrwxr-x 10 tomcat tomcat 4096 abcd-1.23.123
/home/tomcat/services/abcd-1.23.123 - lrwxrwxrwx 1 tomcat tomcat 64 Oct 16 23:46 logs ->
-rwxr-xr-x 1 tomcat tomcat 42493867 Oct 27 04:12 abcd-abcd.log