SV-257531r960930_rule
V-257531
SRG-APP-000118-CTR-000240
CNTR-OS-000290
CAT II
10
Correct log directory ownership by executing the following:
for node in $(oc get node -oname); do oc debug $node -- chroot /host /bin/bash -c 'echo -n "$HOSTNAME "; chown root:root /var/log/' 2>/dev/null; done
Verify the "/var/log" directory is group-owned by root by executing the following command:
for node in $(oc get node -oname); do oc debug $node -- chroot /host /bin/bash -c 'echo -n "$HOSTNAME "; stat -c "%G" /var/log' 2>/dev/null; done
If "root" is not returned as a result, this is a finding.
V-257531
False
CNTR-OS-000290
Verify the "/var/log" directory is group-owned by root by executing the following command:
for node in $(oc get node -oname); do oc debug $node -- chroot /host /bin/bash -c 'echo -n "$HOSTNAME "; stat -c "%G" /var/log' 2>/dev/null; done
If "root" is not returned as a result, this is a finding.
M
5547