MongoDB installation Default and Manual on Ubuntu 20.04

chown’ing the whole data directory to mongodb should be correct.
chmod’ing everything 755 is wrong.

  1. files should be 600
  2. directories should be 700

At least, that’s the way it is in my installation.

PLEASE NOTE the following: https://www.mongodb.com/docs/manual/reference/configuration-options/#mongodb-setting-storage.dbPath

When one asks questions of this sort, it’s usually an indication that one is trying to do something that one shouldn’t be doing :grin:

1 Like