Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Failed to unlink socket file /tmp/mongodb-27017.sock errno:13 Permission denied

When I try to start mongo db I get the following error:

Trying to run the command : ./mongod --dbpath=../data
Failed to unlink socket file /tmp/mongodb-27017.sock errno:13 Permission denied
Fatal Assertion 28578

As per the suggestions from other posts, have tried to locate the file /tmp/mongodb-27017.sock, to delete. But the file itself is not available.

But when I tried to do it using root, I am able to start the mongo DB. For normal users it fails.

Version used: mongodb-osx-x86_64-3.0.2

like image 448
mavlesreennap Avatar asked Dec 06 '22 19:12

mavlesreennap


1 Answers

Remove file

/tmp/mongodb-27017.sock

/dbpath/mongod.lock

try start with any user not root user.

like image 134
Fariz Aghayev Avatar answered Dec 30 '22 09:12

Fariz Aghayev