我正在尝试在 ubuntu 16.04 上启动 mongodb 4.0.4,但数据库拒绝了我的所有尝试。我检查了 mongodb 日志文件,发现名为 WiredTiger.turtle 的文件不需要权限。这里记录错误:
2018-11-26T15:14:32.438+0600 E STORAGE [initandlisten] WiredTiger error (13) [1543223672:438144][32673:0x7fee423e3a40], wiredtiger_open: __posix_open_file, 715: /var/lib/mongodb/WiredTiger.turtle: handle-open: open: Permission denied Raw: [1543223672:438144][32673:0x7fee423e3a40], wiredtiger_open: __posix_open_file, 715: /var/lib/mongodb/WiredTiger.turtle: handle-open: open: Permission denied
2018-11-26T15:14:32.438+0600 E STORAGE [initandlisten] WiredTiger error (13) [1543223672:438429][32673:0x7fee423e3a40], wiredtiger_open: __posix_open_file, 715: /var/lib/mongodb/WiredTiger.turtle: handle-open: open: Permission denied Raw: [1543223672:438429][32673:0x7fee423e3a40], wiredtiger_open: __posix_open_file, 715: /var/lib/mongodb/WiredTiger.turtle: handle-open: open: Permission denied
2018-11-26T15:14:32.438+0600 E STORAGE [initandlisten] WiredTiger error (13) [1543223672:438594][32673:0x7fee423e3a40], wiredtiger_open: __posix_open_file, 715: /var/lib/mongodb/WiredTiger.turtle: handle-open: open: Permission denied Raw: [1543223672:438594][32673:0x7fee423e3a40], wiredtiger_open: __posix_open_file, 715: /var/lib/mongodb/WiredTiger.turtle: handle-open: open: Permission denied
2018-11-26T15:14:32.438+0600 W STORAGE [initandlisten] Failed to start up WiredTiger under any compatibility version.
2018-11-26T15:14:32.438+0600 F STORAGE [initandlisten] Reason: 13: Permission denied
2018-11-26T15:14:32.438+0600 F - [initandlisten] Fatal Assertion 28595 at src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp 646
2018-11-26T15:14:32.438+0600 F - [initandlisten]
***aborting after fassert() failure
我为 /var/lib/mongodb/ 中的所有文件授予了所有权限。但是当我启动 mongodb WiredTiger.turtle 文件的权限重置时。只是为了检查我删除了这个文件,但文件再次出现并且错误重复。