Unable to create/open lock file: /data/mongod.lock errno:13 Permission denied

前端 未结 28 1564
执念已碎
执念已碎 2020-11-29 14:39

How to I get mongo to use a mounted drive on ec2? I really do not understand. I attached a volume on ec2 formatted the drive as root and start as root and yet as root I ca

28条回答
  •  离开以前
    2020-11-29 15:02

    Fix: sudo mongod

    I had the same problem, running mongod with sudo privileges fixed it. Coming from a windows environment, I used just mongod to start the daemon, well it looks like we need the superuser privileges to access /data/db.

    You can also give non root users Read and Write permissions to that path. check answers above for a guide!

提交回复
热议问题