TMAegisBeta
Más reglas para nginx

NGINX

TMA-NGINX-2.3.1

Ensure NGINX directories and files are owned by root

AltaNivel 1Automatizadanginx

Descripción

The NGINX configuration directory and all contained files must be owned by the root user and group to prevent unauthorized modification. Counts files and directories under /etc/nginx not owned by root:root; expects 0. Evaluated on the merged configuration printed by `nginx -T` (all included files; needs permission to read them). CIS marks this recommendation Manual; the automated check implements its audit procedure.

Cómo se verifica

Método de auditoría: Comando de shell

shell
[ -d /etc/nginx ] || exit 1; find /etc/nginx \( ! -user root -o ! -group root \) -print 2>/dev/null | wc -l
Salida esperada
0

Cómo se corrige

Método de corrección: Guía o parche de infraestructura

chown -R root:root /etc/nginx

Propiedades

Sistemas operativos
Cualquiera
Etiquetas
nginxpermissions
Referencia
CIS NGINX Benchmark v3.0.0 - 2.3.1 Ensure NGINX directories and files are owned by root

Verificar este host

Ejecute esto en un equipo que tenga permiso para auditar. El escaneo es de solo lectura.

shell
tmaegis scan --target nginx