I created /data/db in root directory and ran ./mongod:
/data/db
./mongod
[initandlisten] exception in initAndListen: 20 Attempted to create a lock fi
you just need to run the command as a super user:
just type from the terminal: sudo su mongod