user3278612
user3278612

Reputation: 201

mongo server issue when restart the mongo process

Mongo process started by normal user, then server has been rebooted. After rebooting the server, when tried to start the mongod with the same user getting permission denied. I checked in the log file, username got changed to root user.

The error message is

Assertion: 28595: 13 : Permission denied exception in initAndListen: 28595 13: Permission denied, terminating dbexit: rc:100

In log file

1 root      root      256 WiredtigerLog4.log
1 mongodb   mongodb   256 WiredtigerLog3.log
1 mongodb   mongodb   256 WiredtigerLog2.log
1 mongodb   mongodb   256 WiredtigerLog1.log

My question How the user name changed to root

Upvotes: 4

Views: 849

Answers (1)

Ifeanyi Ofoborh
Ifeanyi Ofoborh

Reputation: 61

Just had this same issue with a mount disk. Make sure you change folder group and permission of your mongo data directory to mongod.

delete pid from /var/run/mongodb/mongoX.pid
chown -R mongod:mongod /<mongodatadirectory>/
chmod 775 -R /<mongodatadirectory>/

service mongod restart \sysvinit

Upvotes: 1

Related Questions