Skip to main content
added 1712 characters in body; edited tags
Source Link
nohillside
  • 104.5k
  • 42
  • 222
  • 275

MongoDB sudoers file How to fix Permission Denied error when starting up MongoDB

I followed these stepsSo I'm newbie to learning react and node and thought of building something based on MERN stack Fixing /etc/sudoers file but- I still cant see my sudoers fileinstalled mongodb using -npm install -g mongodb then it says its installed - then to create data directory for Monogo to use I ran mkdir -p /data/db and the response is Permission Denied.

To solve this I am tryingtried to install MongoDB and it is installed on my machinedo - but as soon asFixing /etc/sudoers file which hasn't led me anywhere either. Anyway when I run this command mongod to initiate the database, it shutsgives me shutting me down the server - Please help!!!message as below:

2019-03-29T13:30:02.772+1100 I CONTROL  [main] Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'
2019-03-29T13:30:02.792+1100 I CONTROL  [initandlisten] MongoDB starting : pid=2962 port=27017 dbpath=/data/db 64-bit host=Farwas-MBP
2019-03-29T13:30:02.792+1100 I CONTROL  [initandlisten] db version v4.0.3
2019-03-29T13:30:02.792+1100 I CONTROL [initandlisten] git version: 7ea530946fa7880364d88c8d8b6026bbc9ffa48c
2019-03-29T13:30:02.792+1100 I CONTROL [initandlisten] allocator: system
2019-03-29T13:30:02.792+1100 I CONTROL [initandlisten] modules: none
2019-03-29T13:30:02.792+1100 I CONTROL [initandlisten] build environment:
2019-03-29T13:30:02.792+1100 I CONTROL [initandlisten] distarch: x86_64
2019-03-29T13:30:02.792+1100 I CONTROL [initandlisten] target_arch: x86_64
2019-03-29T13:30:02.792+1100 I CONTROL [initandlisten] options: {}
2019-03-29T13:30:02.792+1100 E STORAGE [initandlisten] Failed to set up listener: SocketException: Address already in use
2019-03-29T13:30:02.793+1100 I CONTROL [initandlisten] now exiting
2019-03-29T13:30:02.793+1100 I CONTROL [initandlisten] shutting down with code:48

MongoDB sudoers file Permission Denied

I followed these steps Fixing /etc/sudoers file but I still cant see my sudoers file - it says Permission Denied I am trying to install MongoDB and it is installed on my machine - but as soon as I run mongod to initiate the database, it shuts down the server - Please help!!!

How to fix Permission Denied error when starting up MongoDB

So I'm newbie to learning react and node and thought of building something based on MERN stack - I installed mongodb using npm install -g mongodb then it says its installed - then to create data directory for Monogo to use I ran mkdir -p /data/db and the response is Permission Denied.

To solve this I tried to do Fixing /etc/sudoers file which hasn't led me anywhere either. Anyway when I run this command mongod it gives me shutting me down server message as below:

2019-03-29T13:30:02.772+1100 I CONTROL  [main] Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'
2019-03-29T13:30:02.792+1100 I CONTROL  [initandlisten] MongoDB starting : pid=2962 port=27017 dbpath=/data/db 64-bit host=Farwas-MBP
2019-03-29T13:30:02.792+1100 I CONTROL  [initandlisten] db version v4.0.3
2019-03-29T13:30:02.792+1100 I CONTROL [initandlisten] git version: 7ea530946fa7880364d88c8d8b6026bbc9ffa48c
2019-03-29T13:30:02.792+1100 I CONTROL [initandlisten] allocator: system
2019-03-29T13:30:02.792+1100 I CONTROL [initandlisten] modules: none
2019-03-29T13:30:02.792+1100 I CONTROL [initandlisten] build environment:
2019-03-29T13:30:02.792+1100 I CONTROL [initandlisten] distarch: x86_64
2019-03-29T13:30:02.792+1100 I CONTROL [initandlisten] target_arch: x86_64
2019-03-29T13:30:02.792+1100 I CONTROL [initandlisten] options: {}
2019-03-29T13:30:02.792+1100 E STORAGE [initandlisten] Failed to set up listener: SocketException: Address already in use
2019-03-29T13:30:02.793+1100 I CONTROL [initandlisten] now exiting
2019-03-29T13:30:02.793+1100 I CONTROL [initandlisten] shutting down with code:48
edited tags
Link
bmike
  • 241.3k
  • 80
  • 433
  • 958
Source Link
fahz
  • 11
  • 2

MongoDB sudoers file Permission Denied

I followed these steps Fixing /etc/sudoers file but I still cant see my sudoers file - it says Permission Denied I am trying to install MongoDB and it is installed on my machine - but as soon as I run mongod to initiate the database, it shuts down the server - Please help!!!