Kaustubh, thanks a lot for the help. However, I'm still having some
issues. The "sudo mkdir -p /data/db" command works fine and creates
the required folders. However, "sudo chown mongodb:mongodb /data/db"
doesn't work. It produces following error: "chown: invalid user:
`mongodb:mongodb'". The mongod generates follwoing message
Thu Jul 21 23:57:44 [initandlisten] db version v1.8.2, pdfile version
4.5
Thu Jul 21 23:57:44 [initandlisten] git version:
433bbaa14aaba6860da15bd4de8edf600f56501b
Thu Jul 21 23:57:44 [initandlisten] build sys info: Linux bs-
linux32.10gen.cc 2.6.21.7-2.fc8xen #1 SMP Fri Feb 15 12:39:36 EST 2008
i686 BOOST_LIB_VERSION=1_37
Thu Jul 21 23:57:44 [initandlisten] exception in initAndListen
std::exception: Unable to create / open lock file for lockfilepath: /
data/db/mongod.lock errno:13 Permission denied, terminating
Thu Jul 21 23:57:44 dbexit:
Thu Jul 21 23:57:44 [initandlisten] shutdown: going to close listening
sockets...
Thu Jul 21 23:57:44 [initandlisten] shutdown: going to flush
diaglog...
Thu Jul 21 23:57:44 [initandlisten] shutdown: going to close
sockets...
Thu Jul 21 23:57:44 [initandlisten] shutdown: waiting for fs
preallocator...
Thu Jul 21 23:57:44 [initandlisten] shutdown: closing all files...
Thu Jul 21 23:57:44 closeAllFiles() finished
Thu Jul 21 23:57:44 [initandlisten] shutdown: removing fs lock...
Thu Jul 21 23:57:44 [initandlisten] couldn't remove fs lock errno:9
Bad file descriptor
Thu Jul 21 23:57:44 dbexit: really exiting now
Now it is having issues with access permissions.
On Jul 21, 11:47 pm, Kaustubh Padegaonkar <
thetuxra...@gmail.com>
wrote:
> Change the ownership of the folder to mongodb.
>
> sudo chown mongodb:mongodb /data/db
>
> Also, seems you have not installed mongodb, but executing the binaries. Take
> a look at how tto install mongodb given
> here<
http://www.mongodb.org/display/DOCS/Ubuntu+and+Debian+packages>
> .