Back
I created /data/db in root directory and ran ./mongod:
[initandlisten] exception in initAndListen: 20 Attempted to create a lock file on a read-only directory: /data/db, terminating [initandlisten] shutdown: going to close listening sockets... [initandlisten] shutdown: going to flush diaglog... [initandlisten] now exiting [initandlisten] shutting down withcode:100
[initandlisten] exception in initAndListen: 20 Attempted to create a lock file on a read-only directory: /data/db, terminating
[initandlisten] shutdown: going to close listening sockets... [initandlisten] shutdown: going to flush diaglog... [initandlisten] now exiting [initandlisten] shutting down with
code:100
You can use mongo as root, works for me:
$ sudo mongod
31k questions
32.8k answers
501 comments
693 users