Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I just transferred my data directory (of Mongo 1.6.5) to a new server and installed Mongo 2.0 on it. I set the data directory path and did sudo server mongod restart.

It failed, and the log file output says this -

***** SERVER RESTARTED *****


Sun Oct  9 07:51:47 [initandlisten] MongoDB starting : pid=8224 port=27017 dbpath=/database/mongodb 64-bit host=domU-12-31-39-09-35-81
Sun Oct  9 07:51:47 [initandlisten] db version v2.0.0, pdfile version 4.5
Sun Oct  9 07:51:47 [initandlisten] git version: 695c67dff0ffc361b8568a13366f027caa406222
Sun Oct  9 07:51:47 [initandlisten] build info: Linux bs-linux64.10gen.cc 2.6.21.7-2.ec2.v1.2.fc8xen #1 SMP Fri Nov 20 17:48:28 EST 2009 x86_64 BOOST_LIB_VERSION=1_41
Sun Oct  9 07:51:47 [initandlisten] options: { auth: "true", config: "/etc/mongod.conf", dbpath: "/database/mongodb", fork: "true", logappend: "true", logpath: "/var/log/mongo/mongod.log", nojournal: "true" }
Sun Oct  9 07:51:47 [initandlisten] couldn't open /database/mongodb/local.ns errno:1 Operation not permitted
Sun Oct  9 07:51:47 [initandlisten] error couldn't open file /database/mongodb/local.ns terminating
Sun Oct  9 07:51:47 dbexit: 
Sun Oct  9 07:51:47 [initandlisten] shutdown: going to close listening sockets...
Sun Oct  9 07:51:47 [initandlisten] shutdown: going to flush diaglog...
Sun Oct  9 07:51:47 [initandlisten] shutdown: going to close sockets...
Sun Oct  9 07:51:47 [initandlisten] shutdown: waiting for fs preallocator...
Sun Oct  9 07:51:47 [initandlisten] shutdown: closing all files...
Sun Oct  9 07:51:47 [initandlisten] closeAllFiles() finished
Sun Oct  9 07:51:47 [initandlisten] shutdown: removing fs lock...
Sun Oct  9 07:51:47 dbexit: really exiting now

I have already run it with --upgrade once.

share|improve this question

migrated from stackoverflow.com Oct 10 '11 at 10:39

This question came from our site for professional and enthusiast programmers.

    
does it have enough right to access /database/mongodb/local.ns? –  splix Oct 9 '11 at 8:05
1  
I had to change the owner of the file to mongod and it worked. Thanks. –  kapeels Oct 9 '11 at 8:13
    
You should answer and accept your own solution, makes it cleaner (no longer lists as an unanswered question) –  Adam C Mar 22 '12 at 11:55

1 Answer 1

up vote 2 down vote accepted

I had to change the owner of the file to mongod and it worked.

share|improve this answer
    
how do you do so? –  Jim Thio Aug 30 '12 at 10:17

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.