MongoDB
TMA-MONGO-CONFIG-PERMISSIONS
Ensure /etc/mongod.conf is not writable by group or readable by others
MoyenneNiveau 1Automatiséemongodb
Description
The configuration file can reference key files and TLS settings; it should be mode 640 or stricter. SKIP when the file does not exist.
Méthode de vérification
Méthode d'audit: Commande 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- Sortie attendue
compliant
Méthode de correction
Méthode de correction: Commande shell
shell
chmod 640 /etc/mongod.confPropriétés
- Systèmes d'exploitation
- Tous
- Étiquettes
- mongodbdatabasepermissionsfilesystem
- Référence
- CIS MongoDB Benchmark - File Permissions / Configuration File (verify section number for your release)
Vérifier cet hôte
Exécutez cette commande sur une machine que vous êtes autorisé à auditer. L'analyse est en lecture seule.
shell
tmaegis scan --target mongodb