7.2 Ensure appropriate database file permissions are set

Information

MongoDB database files need to be protected using file permissions.

Rationale:

This will restrict unauthorized users from accessing the database.

Solution

Set ownership of the database file to mongodb user and remove other permissions using the following commands:

chmod 770 /var/lib/mongodb
chown mongodb:mongodb /var/lib/mongodb

Default Value:

Not configured

See Also

https://workbench.cisecurity.org/benchmarks/15135

Item Details

Category: ACCESS CONTROL

References: 800-53|AC-3, CSCv7|14.6

Plugin: Unix

Control ID: 0b147855ce5ba7b1e73afe98db8019e5d63358591b2167b452e87a7d619105b1