表现:sudo mongod可以成功启动mongo,但是不加sudo则不行,自然不希望每次都加sudo

完整报错:

2019-06-04T21:12:39.488+0800 I CONTROL  [initandlisten] MongoDB starting : pid=13900 port=27017 dbpath=/data/db 64-bit host=john-P95-HP
2019-06-04T21:12:39.488+0800 I CONTROL  [initandlisten] db version v3.6.3
2019-06-04T21:12:39.488+0800 I CONTROL  [initandlisten] git version: 9586e557d54ef70f9ca4b43c26892cd55257e1a5
2019-06-04T21:12:39.488+0800 I CONTROL  [initandlisten] OpenSSL version: OpenSSL 1.1.1  11 Sep 2018
2019-06-04T21:12:39.488+0800 I CONTROL  [initandlisten] allocator: tcmalloc
2019-06-04T21:12:39.488+0800 I CONTROL  [initandlisten] modules: none
2019-06-04T21:12:39.488+0800 I CONTROL  [initandlisten] build environment:
2019-06-04T21:12:39.488+0800 I CONTROL  [initandlisten]     distarch: x86_64
2019-06-04T21:12:39.488+0800 I CONTROL  [initandlisten]     target_arch: x86_64
2019-06-04T21:12:39.488+0800 I CONTROL  [initandlisten] options: {}
2019-06-04T21:12:39.495+0800 I -        [initandlisten] Detected data files in /data/db created by the 'wiredTiger' storage engine, so setting the active storage engine to 'wiredTiger'.
2019-06-04T21:12:39.495+0800 I STORAGE  [initandlisten] 
2019-06-04T21:12:39.495+0800 I STORAGE  [initandlisten] ** WARNING: Using the XFS filesystem is strongly recommended with the WiredTiger storage engine
2019-06-04T21:12:39.495+0800 I STORAGE  [initandlisten] **          See http://dochub.mongodb.org/core/prodnotes-filesystem
2019-06-04T21:12:39.495+0800 I STORAGE  [initandlisten] wiredtiger_open config: create,cache_size=7449M,session_max=20000,eviction=(threads_min=4,threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000),statistics_log=(wait=0),verbose=(recovery_progress),
2019-06-04T21:12:39.932+0800 E STORAGE  [initandlisten] WiredTiger error (1) [1559653959:932022][13900:0x7f49416a70c0], file:WiredTiger.wt, connection: /data/db/WiredTiger.wt: handle-open: open: Operation not permitted
2019-06-04T21:12:39.933+0800 E -        [initandlisten] Assertion: 28595:1: Operation not permitted src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp 413
2019-06-04T21:12:39.933+0800 I STORAGE  [initandlisten] exception in initAndListen: Location28595: 1: Operation not permitted, terminating
2019-06-04T21:12:39.933+0800 I NETWORK  [initandlisten] shutdown: going to close listening sockets...
2019-06-04T21:12:39.933+0800 I NETWORK  [initandlisten] removing socket file: /tmp/mongodb-27017.sock
2019-06-04T21:12:39.933+0800 I CONTROL  [initandlisten] now exiting
2019-06-04T21:12:39.933+0800 I CONTROL  [initandlisten] shutting down with code:100

处理:

# storage.dbPath
sudo chown -R mongodb:mongodb /var/lib/mongodb# systemLog.path
sudo chown -R mongodb:mongodb /var/log/mongodb

这里面的mongodb:mongodb分别是用户组和用户名,

可通过如下命令查询当前用户所属组,

groups xxxx:xxxx是当前登录用户(一个用户可能属于多个组)

参考:https://stackoverflow.com/questions/43137250/mongodb-3-4-3-permission-denied-wiredtiger-kv-engine-cpp-267-error-with-ubuntu-1

mongo报错WiredTiger.wt, connection: /data/db/WiredTiger.wt: handle-open: open: Operation not permitted相关推荐

  1. mongo报错:not authorized on bb to execute command { create: \“xxx\“...}

    mongo报错: {"ok" : 0,"errmsg" : "not authorized on bb to execute command { cr ...

  2. mac mongodb : 715: /data/db/WiredTiger.turtle: handle-open: open: Permission denied

    mongodb 出现错误: 715: /data/db/WiredTiger.turtle: handle-open: open: Permission denied 解决: sudo mongod ...

  3. 阿里云 java程序 链接redis 报错 : IO Error: Connection reset

    阿里云 java程序 链接redis 报错 : IO Error: Connection reset 报错内容 2018-03-07 17:33:41.224 ERROR [main][Worker. ...

  4. IDEA配置GitHub报错GitHub Invalid authentication data.404 Not Found-Not Found

    登录账户`GitHub Invalid authentication data.404 Not Found-Not Found`报错及解决办法 1 登录自己的github账号-->头像---&g ...

  5. 网络报错:“The connection is not for this device.”

    网络报错:"The connection is not for this device." 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 记得在前几天工作的时候 ...

  6. python3.7运行报错_Python 3.7 环境下运行 scrapy crawl 报错 def write(self, data, async=False)?...

    Python 3.7 环境下运行 scrapy crawl 报错 def write(self, data, async=False),详细报错信息如下: 2018-08-10 15:10:29 [s ...

  7. consul注册报错 connectex: No connection could be made because the target machine actively refused it.

    consul注册报错 connectex: No connection could be made because the target machine actively refused it. Ge ...

  8. 针对报错 ValueError: When using data tensors as input to a model, you should specify the `steps_per_epoc

    针对报错 ValueError: When using data tensors as input to a model, you should specify the steps_per_epoch ...

  9. win10连接本地DB2报错:Message: Insufficient data. ERRORCODE=-4499, SQLSTATE=08001

    我使用的工具是:Dbeaver 报错信息: [jcc][t4][2030][11211][4.16.53] A communication error occurred during operatio ...

最新文章

  1. Apache Spark学习:利用Eclipse构建Spark集成开发环境
  2. python 12 socket 编程
  3. 为什么HTTPS是安全的
  4. datatable导出Excel
  5. Hyper-V 的导入和导出
  6. activiti如何最后一次提交事务_2020最后一次水逆,十二星座如何防水逆?
  7. Jersey中ContainerRequestFilter的使用
  8. python删除重复元素_Python-删除列表中重复元素的方法
  9. 吴恩达深度学习 —— 3.8 激活函数的导数
  10. STM32电机库5.4开源注释 KEIL工程文件 辅助理解S STM32电机库5.4开源注释
  11. python label字体_Matplotlib xlabel,Arial格式,带一个斜体字
  12. 【SVM回归预测】基于matlab布谷鸟算法优化SVM回归预测【含Matlab源码 1422期】
  13. 小程序API可以实现哪些功能
  14. ks检验正态分布结果_正态分布检验的那些方法
  15. 华为快应用 阻止事件冒泡
  16. Shine——更简单的Android网络请求库封装
  17. iOS11 如何防止用户录屏?
  18. source insight 4.0 代码函数变量符号高亮
  19. 在windows系统中安装Sulley
  20. telegram电报机器人配置

热门文章

  1. ssma5.3_使用SSMA v7.1 for Oracle迁移到SQL Server
  2. 如何使用PowerShell在Azure中创建SQL虚拟机
  3. 下次偶转贴贴子时得加上转贴才行~~~
  4. Vue的v-if与v-show的区别
  5. 使用Spark分析拉勾网招聘信息(四): 几个常用的脚本与图片分析结果
  6. 遇到的一个很有趣的陷阱
  7. CentOS上安装软件错误提示:configure: error: no acceptable C compiler found in $PATH
  8. Error: Cannot Determine the location of the VS common tools folder
  9. sqlite遇到database is locked问题的完美解决
  10. NHibernate Linq中Null值排序的解决方法