When using the command
db["my_collectionName"].find()
in the mongo shell, my queries return:
"message" : "Permission denied @ rb_sysopen - /var/log/syslog".
How do I go about solving this permission issue?
Make sure you have proper permissions for /data/db
folder/directory.
You can try:
sudo chown -R mongodb:mongodb /data/db
Check all paths in mongodb config (/etc/mongod.conf) and assign right permission (dbpath, logpath...)