MacOS switched root Mongodb data folder to system ownership and it cannot be changed back anymore

by Dom Berk   Last Updated July 12, 2019 08:01 AM

The title gives it away, I suppose.

Here's the deal:

MacOS switched my /data/db folder, which is used by MongoDB, which I need to get a ton of work done, to read-only file system. Basically happened overnight.

Running ls -lO /data returns the following: drwxr-xr-x 182 root admin - 5824 Jul 11 17:33 db

Trying to run sudo chmod -R 777 $USER /data returns the following: chmod: Unable to change file mode on /data/db/index-32-577782821146278306.wt: Read-only file system for a total of A LOT of entries.

I presume it's the SIP that's causing this. I tried disabling it in the recovery mode by running csrutil disable. That did disable it, but still didn't let me change my permissions.

I'm all out of ideas as to what could be happening. Perhaps my account is broken?

Related Questions

Updated April 23, 2018 19:01 PM

Updated September 24, 2017 09:01 AM

Updated January 19, 2018 00:01 AM

Updated June 01, 2019 13:01 PM

Updated January 27, 2018 22:01 PM