From 218d5b8a985feab29605c81ad50fbe042cc50f8e Mon Sep 17 00:00:00 2001 From: Mykola Malkov Date: Tue, 21 Apr 2020 13:00:21 +0300 Subject: [PATCH] TT#47113 Fix check of nginx logs The ownership of nginx logs is www-data:adm. Also check empty files to catch wrong permissions as soon as possible. Change-Id: Icb9e1e1c9590bbef7021e3826a19419f7c21f9ce --- templates/135_filesys-logfiles.yaml.tt2 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/135_filesys-logfiles.yaml.tt2 b/templates/135_filesys-logfiles.yaml.tt2 index 10eface..248117b 100644 --- a/templates/135_filesys-logfiles.yaml.tt2 +++ b/templates/135_filesys-logfiles.yaml.tt2 @@ -118,21 +118,21 @@ command: - '!/./' [% END -%] - "if test -e /var/log/ngcp/nginx/; then find /var/log/ngcp/nginx/ -type f -size +0 -perm /o+rwx; fi": + "if test -e /var/log/ngcp/nginx/; then find /var/log/ngcp/nginx/ -type f -perm /o+rwx; fi": exit-status: 0 stdout: - '!/./' stderr: - '!/./' - "if test -e /var/log/ngcp/nginx/; then find /var/log/ngcp/nginx/ -size +0 -type f ! -user www-data; fi": + "if test -e /var/log/ngcp/nginx/; then find /var/log/ngcp/nginx/ -type f ! -user www-data; fi": exit-status: 0 stdout: - '!/./' stderr: - '!/./' - "if test -e /var/log/ngcp/nginx/; then find /var/log/ngcp/nginx/ -size +0 -type f ! -group adm; fi": + "if test -e /var/log/ngcp/nginx/; then find /var/log/ngcp/nginx/ -type f ! -group adm; fi": exit-status: 0 stdout: - '!/./'