MongoDB
TMA-MONGO-CONFIG-PERMISSIONS
Ensure /etc/mongod.conf is not writable by group or readable by others
MediaNivel 1Automatizadamongodb
Descripción
The configuration file can reference key files and TLS settings; it should be mode 640 or stricter. SKIP when the file does not exist.
Cómo se verifica
Método de auditoría: Comando de shell
shell
p=$(stat -c %a /etc/mongod.conf 2>/dev/null) || exit 1; if [ $((0$p & 037)) -eq 0 ]; then echo compliant; else echo "mode $p"; fi- Salida esperada
compliant
Cómo se corrige
Método de corrección: Comando de shell
shell
chmod 640 /etc/mongod.confPropiedades
- Sistemas operativos
- Cualquiera
- Etiquetas
- mongodbdatabasepermissionsfilesystem
- Referencia
- CIS MongoDB Benchmark - File Permissions / Configuration File (verify section number for your release)
Verificar este host
Ejecute esto en un equipo que tenga permiso para auditar. El escaneo es de solo lectura.
shell
tmaegis scan --target mongodb