15

I disabled SIP, but directory /usr/bin is write protected anyway. How to get write access for /usr/bin? Please don't suggest to switch to /usr/local/bin. enter image description here

2 Answers 2

16

I assume this answer might be relatively off-topic, as I'm not running the beta version of Catalina, but the official one.

In order to perform changes to /usr/bin, you'll have to perform the following steps.

  1. Disable System Integrity Protection (SIP).
  2. Mount / as writeable.

Disable SIP

  • Reboot your system into recovery mode (reboot and hold cmd + R while booting)
  • Use the appropriate credentials when prompted.
  • Navigate to Utilities -> Terminal in the top bar.
  • In the terminal session, execute # csrutil disable.
  • Reboot into normal boot mode (# reboot).

Mount / as writeable

With the OS in normal mode, start a new terminal session and execute the following:

  • $ sudo mount -uw /

Please note that / will be mounted as read-only on the next system boot.

In order to enable SIP, the process is exactly the same as disabling it, except for the fact that you would have to run # csrutil enable.

11
  • 2
    With the release of Сatalina, this approach no longer works. Dec 19, 2019 at 3:56
  • 2
    I wrote the above instructions after having executed the steps in Catalina 10.15 (19A603). Jan 6, 2020 at 12:52
  • 2
    Thanks man! This approach works on Catalina 10.15.3 1. Boot in recovery mode Cmd+R on start 2. Chose csrutil enable in terminal and reboot 3. $ sudo mount -uw / in terminal and BINGO! I can create symbolic links in /usr/bin
    – Viktor
    Apr 21, 2020 at 14:30
  • 2
    mount_apfs: volume could not be mounted: Permission denied mount: / failed with 66
    – cmcginty
    Jan 31, 2021 at 22:57
  • 6
    @VladDumitrache doesn't work for Big Sur. Feb 23, 2021 at 10:55
11

Catalina has a new file system arrangement where most of the system files are write-protected. Apple uses two partitions, a read-only one for the main system files and a writeable one for other files, and melds them together and presents them as one to the user.

For details see the WWDC video What's New in Apple Filesystems

5
  • Does it mean no chance to edit main system files? But If I already have cocoapods installed to /usr/bin, how to remove it? Aug 12, 2019 at 20:46
  • 1
    As per the linked talked you can apparently disable the read-only protection temporarily. Also from that talk you'll see /usr/local/bin should be writeable so you might have to go against your wish in your question. If you have further queries on how this change is working out you might do better on the Apple developer forums where you'll find a section for Catalina Beta.
    – CRD
    Aug 12, 2019 at 21:16
  • I'm afraid, this won't help. I initially wrote that SIP was disabled. Yes, I can disable SIP protection temporarily, but /usr/bin is still write protected. Historically I have cocoapods installed in /usr/bin. And now I can't uninstall it from that system dir. Aug 14, 2019 at 23:19
  • 1
    If you are following the talk and you can't write to /usr/bin afterwards that sounds like a beta bug – please report it to Apple.
    – CRD
    Aug 14, 2019 at 23:32
  • Writing to /usr/bin does not work on Ventura with Apple Silicon. Trying to create symbolic links to /usr/bin in /usr/local/bin has funny results. This interferes with various scripts using #!/usr/bin/<prog>. Mar 7, 2023 at 9:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.