OS X El Capitan and later includes System Integrity Protection (SIP) security feature that helps Mac users prevent potentially malicious software from access important system files and modifying protected files and folders on Mac machine. Before System Integrity Protection, the root user could access any system folder or app on your Mac. More details about SIP, you can visit this article from Apple: https://support.apple.com/en-us/HT204899
Note that The System Integrity Protection setting is stored in NVRAM rather than in the file system itself. It can only be modified from the recovery environment.
How to turn off System Integrity Protection in macOS
Here's how to turn off System Integrity Protection on Mac
Restart your Mac and your new System Integrity Protection setting will take effect.
If you want to enable SIP later, then follow these steps again to return to the recovery environment and run the following command: csrutil enable. We'd recommend you re-enable it when you're done tinkering tasks such as data recovery.
How to check System Integrity Protection
To check if System Integrity Protection is enabled or not, follow the steps below.