Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialMichael Constantinou
6,758 PointsMongoDB setup
Hi,
I've seen lots of comments saying running mongodb with the command "sudo mongod" is bad practice, but it's only way that works for me so far. I've changed the permissions on the db to read and write but it's making no difference. So using the command mongod, I get the following:
2018-10-01T16:29:12.697+0100 I CONTROL [main] Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none' 2018-10-01T16:29:12.712+0100 I CONTROL [initandlisten] MongoDB starting : pid=27385 port=27017 dbpath=/data/db 64-bit host=Michaels-MacBook-Pro.local 2018-10-01T16:29:12.712+0100 I CONTROL [initandlisten] db version v4.0.2 2018-10-01T16:29:12.712+0100 I CONTROL [initandlisten] git version: fc1573ba18aee42f97a3bb13b67af7d837826b47 2018-10-01T16:29:12.712+0100 I CONTROL [initandlisten] allocator: system 2018-10-01T16:29:12.712+0100 I CONTROL [initandlisten] modules: none 2018-10-01T16:29:12.712+0100 I CONTROL [initandlisten] build environment: 2018-10-01T16:29:12.712+0100 I CONTROL [initandlisten] distarch: x86_64 2018-10-01T16:29:12.712+0100 I CONTROL [initandlisten] target_arch: x86_64 2018-10-01T16:29:12.712+0100 I CONTROL [initandlisten] options: {} 2018-10-01T16:29:12.713+0100 I STORAGE [initandlisten] Detected data files in /data/db created by the 'wiredTiger' storage engine, so setting the active storage engine to 'wiredTiger'. 2018-10-01T16:29:12.713+0100 I STORAGE [initandlisten] wiredtiger_open config: create,cache_size=3584M,session_max=20000,eviction=(threads_min=4,threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000),statistics_log=(wait=0),verbose=(recovery_progress), 2018-10-01T16:29:13.304+0100 E STORAGE [initandlisten] WiredTiger error (13) [1538407753:304969][27385:0x7fffa4722380], wiredtiger_open: __posix_open_file, 711: /data/db/WiredTiger.turtle: handle-open: open: Permission denied Raw: [1538407753:304969][27385:0x7fffa4722380], wiredtiger_open: __posix_open_file, 711: /data/db/WiredTiger.turtle: handle-open: open: Permission denied 2018-10-01T16:29:13.305+0100 E STORAGE [initandlisten] WiredTiger error (13) [1538407753:305245][27385:0x7fffa4722380], wiredtiger_open: __posix_open_file, 711: /data/db/WiredTiger.turtle: handle-open: open: Permission denied Raw: [1538407753:305245][27385:0x7fffa4722380], wiredtiger_open: __posix_open_file, 711: /data/db/WiredTiger.turtle: handle-open: open: Permission denied 2018-10-01T16:29:13.305+0100 E STORAGE [initandlisten] WiredTiger error (13) [1538407753:305447][27385:0x7fffa4722380], wiredtiger_open: __posix_open_file, 711: /data/db/WiredTiger.turtle: handle-open: open: Permission denied Raw: [1538407753:305447][27385:0x7fffa4722380], wiredtiger_open: __posix_open_file, 711: /data/db/WiredTiger.turtle: handle-open: open: Permission denied 2018-10-01T16:29:13.305+0100 F STORAGE [initandlisten] Failed to start up WiredTiger under any compatibility version. 2018-10-01T16:29:13.305+0100 F STORAGE [initandlisten] 13: Permission denied 2018-10-01T16:29:13.305+0100 F - [initandlisten] Fatal Assertion 28595 at src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp 196 2018-10-01T16:29:13.305+0100 F - [initandlisten]
***aborting after fassert() failure
Any ideas what I can do?