[mongoDB]Failed to unlink socket file /tmp/mongodb-[portnum].sock Operation not permitted

来源:互联网 发布:sql注入例题分析 编辑:程序博客网 时间:2024/06/03 16:14

这里写图片描述

运行命令:ll /tmp/mongodb-30001.sock
srwx—— 1 root root 0 Oct 17 17:30 /tmp/mongodb-30001.sock

可以看到用户是root,如果启动mongod的用户不是root,就会出现上述异常。

解决方法就是直接删除文件/tmp/mongodb-30001.sock。

阅读全文
0 0
原创粉丝点击