Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Web Technology by (47.6k points)

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 with

code:100

1 Answer

0 votes
by (106k points)

You can use mongo as root, works for me:

$ sudo mongod

Related questions

0 votes
2 answers
asked Oct 17, 2019 in Web Technology by Sammy (47.6k points)
0 votes
2 answers
0 votes
1 answer
asked Feb 5, 2020 in Web Technology by ashely (50.2k points)
0 votes
1 answer

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...