SV-96563r1_rule
V-81849
SRG-APP-000118-DB-000059
MD3X-00-000190
CAT II
10
Run these commands:
"chown mongod <MongoDB auditLog directory>"
"chgrp mongod <MongoDB auditLog directory>"
"chmod 700 <<MongoDB auditLog directory>"
(The path for the MongoDB auditLog directory will vary according to local circumstances. The auditLog directory will be found in the MongoDB configuration file whose default location is '/etc/mongod.conf'.)
To find the auditLog directory name, view and search for the entry in the MongoDB configuration file for the auditLog.path:
Example:
auditLog:
destination: file
format: BSON
path: /var/lib/mongo/auditLog.bson
Given the example above, to find the auditLog directory name run the following command:
> dirname /var/lib/mongo/auditLog.bson
the output will be the "<MongoDB auditLog directory>"
/var/lib/mongo
Verify User ownership, Group ownership, and permissions on the "<MongoDB auditLog directory>":
> ls –ald <MongoDB auditLog data directory>
If the User owner is not "mongod", this is a finding.
If the Group owner is not "mongod", this is a finding.
If the directory is more permissive than "700", this is a finding.
(The path for the MongoDB auditLog directory will vary according to local circumstances. The auditLog directory will be found in the MongoDB configuration file whose default location is '/etc/mongod.conf'.)
To find the auditLog directory name, view and search for the entry in the MongoDB configuration file for the auditLog.path:
Example:
auditLog:
destination: file
format: BSON
path: /var/lib/mongo/auditLog.bson
Given the example above, to find the auditLog directory name run the following command:
> dirname /var/lib/mongo/auditLog.bson
the output will be the "<MongoDB auditLog directory>"
/var/lib/mongo
V-81849
False
MD3X-00-000190
Verify User ownership, Group ownership, and permissions on the "<MongoDB auditLog directory>":
> ls –ald <MongoDB auditLog data directory>
If the User owner is not "mongod", this is a finding.
If the Group owner is not "mongod", this is a finding.
If the directory is more permissive than "700", this is a finding.
(The path for the MongoDB auditLog directory will vary according to local circumstances. The auditLog directory will be found in the MongoDB configuration file whose default location is '/etc/mongod.conf'.)
To find the auditLog directory name, view and search for the entry in the MongoDB configuration file for the auditLog.path:
Example:
auditLog:
destination: file
format: BSON
path: /var/lib/mongo/auditLog.bson
Given the example above, to find the auditLog directory name run the following command:
> dirname /var/lib/mongo/auditLog.bson
the output will be the "<MongoDB auditLog directory>"
/var/lib/mongo
M
3265