Resolve mongodb startup failure under ubuntu prompt couldn 't remove fs lock errno:9 Bad file descriptor error

  • 2020-05-06 11:58:01
  • OfStack

Follow the installation method on the official website:

The following error may occur under the ubuntu system:

couldn't remove fs lock errno:9 Bad file descriptor

At this point you need to modify the file owner

$ sudo mkdir -p /data/db/

$sudo chown 'USERNAME '/data/db

The first is to create your database folder, and the second is to change the owner of the folder,

Then you can successfully launch mongodb and

Reference: stackoverflow com/questions / 15229412 / unable - to - create - open - lock - file - data - mongod - lock - errno13 - permission - denied


Related articles: