Answers for "illegaloperation: attempted to create a lock file on a read-only directory: /data/db, terminating"

0

illegaloperation: attempted to create a lock file on a read-only directory: /data/db, terminating

From the question description it appears you are running mongod from your own account (user: makan).

Your invocation of mongod without specifying a configuration file or --dbpath would require this user to have read/write permissions for the default dbpath directory (/data/db). Since /data/db is only writable by user mongodb, a permission error is expected when mongod tries to write a file running with the permissions of makan:
Posted by: Guest on March-02-2021

Code answers related to "illegaloperation: attempted to create a lock file on a read-only directory: /data/db, terminating"

Browse Popular Code Answers by Language