当前位置:网站首页>解决运行Mongodb报错 Attempted to create a lock file on a read-only directory: /data/db
解决运行Mongodb报错 Attempted to create a lock file on a read-only directory: /data/db
2022-07-15 13:51:00 【呆萌的代Ma】
完整报错:
{
"t":
{
"$date":"2022-07-15T09:36:09.517+08:00"},
"s":"E",
"c":"CONTROL",
"id":20557,
"ctx":"initandlisten",
"msg":"DBException in initAndListen, terminating",
"attr":
{
"error":"IllegalOperation: Attempted to create a lock file on a read-only directory: /data/db"}
}
解决方法
如果没有/data/db文件夹,则创建并赋予权限即可:
sudo mkdir -m 777 -p /data/db
如果已经创建了data/db文件夹,直接赋予权限即可:
sudo chmod 777 /data/*
边栏推荐
- My creation anniversary
- Is it safe to open an account online now? Want to know how to open a stock account in a preferential way?
- ThreadLocal原理及源码解析(一步一步点进去,不要背了,学思想)
- 语句和表达式有什么不同
- SaaS application: the best way to realize enterprise digital transformation
- 面试题:谈谈你对AQS 的理解
- Interprocess communication - shared memory
- 【数值分析练习】数值积分(复化梯形,复化Simpson,Romberg积分)C with STL实现
- MGRE与OSPF
- ReentranLock及源码解析(学思想,一步一步点进源码)
猜你喜欢

盘点波卡生态潜力项目 | 跨链特性促进多赛道繁荣

Tab plus swiper long list scrolling

Class的生命周期
![[openfoam pre school preparation 3 - install openfoam-v8]](/img/2a/29b7beadc9a8284a767e0369279af0.png)
[openfoam pre school preparation 3 - install openfoam-v8]

Seven suggestions on knowledge management in the construction of enterprises and institutions

Kubernetes单Master集群二进制搭建

101. (cesium chapter) cesium particle system - snow

Flat rider registration form

【OpenFOAM學前預備3——安裝OpenFOAM-v8】

好消息|该地考生的二建成绩能查询了
随机推荐
深更半夜 - excel办公自动化定制版
Midnight - customized version of Excel office automation
Technology sharing | common interface protocol analysis
强化学习(Q-Learning)与路径搜索(A*)的联系
假如需求拆分像切蛋糕一样简单 | 敏捷实践
开源数据质量解决方案——Apache Griffin入门宝典
How to test SQL of Flink? You can't use jar test every time, so sqk client comes
101. (cesium chapter) cesium particle system - snow
Very comprehensive use of ireport
扁平化骑手注册表单
Application of Tupu web visualization engine in simulation analysis field
The practice of opengauss database on CentOS, configuration
tab加swiper长列表滚动
MGRE comprehensive experiment
技术分享 | 使用postman发送请求
一般业务通用废品类封装 案例
JS image editor plug-in filerobot
js图片编辑器插件Filerobot
从源码学习线程池的使用原理及核心思想解析
SaaS application: the best way to realize enterprise digital transformation