7.2 Ensure that database file permissions are set correctly

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 tomongodb user and remove other permissions using the following commands:

chmod 660 /var/lib/mongodb

sudo chown mongodb:mongodb /var/lib/mongodb

Default Value:

Not configured

See Also

https://workbench.cisecurity.org/files/168

Item Details

Category: CONFIGURATION MANAGEMENT

References: 800-53|CM-6b.

Plugin: Unix

Control ID: ab4708bf52badf5a10bafa72c0cbe676b51264e1fc27b508b4bf747f58e26137