1

I'm starting with MongoDB and it looks like it needs a writable /data/db. So I created a folder /data/db as superuser but then when I start it requires the rights the write on that directory (makes sense).

My question is : should I do a chmod 777 on /data/db ? Or should I run mongod as sudo ?

According to : mongodb Mongod complains that there is no /data/db folder

I should do

grep mongo /etc/passwd

but that does not return anything

And sudo chown -R mongod:mongod /data/db gives me a chown: mongod: illegal group name

Thanks

EDIT: I've chown -R totosh:staff /data/db (totosh being my username) and now it works. Is it the right thing to do though ?

Krowar
  • 341
  • 2
  • 7
  • 15

0 Answers0