I’m new to linux and mongodb so this is probably a newbe question…
I can start mongo like this (alt #1)
$ mongod --dbpath /mnt/datadrive/data --logpath /mnt/datadrive/data/mongod.log
But when I start is “service-wise” (alt #2)
$ sudo service mongod start
I get:
Starting mongod: can't open /mnt/datadrive/data/mongod.log
for log file: errno:13 Permission denied
(i’ve set the dbpath and logpath in /etc/mongod.conf)
So, is mongod started with a different user when run alt #2? What account is that?
If so, how do I allow that account to access /mnt/datadrive/data/ ?
Thanks!
1 Answer