我/data/db
在根目录中创建并运行./mongod
:
[initandlisten] exception in initAndListen: 20 Attempted to create a lock file on a read-only directory: /data/db, terminating
[initandlisten] shutdown: going to close listening sockets...
[initandlisten] shutdown: going to flush diaglog...
[initandlisten] now exiting
[initandlisten] shutting down with code:100
-ld
:)
drwxrwxrwx. 4 mongod mongod 4096 Sep 17 18:18 /data/db
,但仍然出现错误。有任何想法吗?
ls -ld /data/db
和id
,所以我们可以建议。