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 to mongodb user and remove other permissions using the following commands:
chmod 600 /var/lib/mongodb
sudo chown mongodb:mongodb /var/lib/mongodb
Default Value:
Not configured

See Also

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

Item Details

Category: CONFIGURATION MANAGEMENT

References: 800-53|CM-6b., CSCv6|14.4

Plugin: Unix

Control ID: 02220116286f4fbf4edab643e4d0e70d233f49646ead246424f2288df19aadee