chown
’ing the whole data directory to mongodb should be correct.
chmod
’ing everything 755 is wrong.
- files should be 600
- 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