3

I'm getting the following message when I try connecting to MongoLab with the command:

mongo ds035438.mongolab.com:35438/comeventsbw -u (myusername) -p (mypassword)

MongoDB shell version: 3.0.6 connecting to: ds035438.mongolab.com:35438/comeventsbw 2015-12-10T10:30:18.537-0700 I STORAGE In File::open(), ::open for '/Users/benwong/.mongorc.js' failed with errno:13 Permission denied The ".mongorc.js" file located in your home folder could not be executed

Ben Wong
  • 691
  • 2
  • 19
  • 29

2 Answers2

10

You can try to delete the root directory .mongorc.js file. To do this in mac OS you can use cd ~/&&ls -al, if you see .mongorc.js that is owned by root, so we can use sudo rm .mongorc.js to delete it.

Lilith Daemon
  • 1,473
  • 1
  • 19
  • 37
Haojen
  • 686
  • 7
  • 9
1

I got the same error in Ubuntu-18. Initially I logged in as normal user. I typed mongo on the terminal. So I got same above error. So I switched to the root user using sudo -s This time when I typed mongo command on the terminal I'm able to connect mongo server. So I thought this service is not available for the normal user.

Kodali444
  • 1,283
  • 1
  • 17
  • 21