2
> sudo rmdir /sw
rmdir: /sw: Read-only file system

> mount | grep read
/dev/disk1s5 on / (apfs, local, read-only, journaled)

> sudo mount -o rw /
> mount
/dev/disk1s5 on / (apfs, local, journaled)
> sudo rmdir /sw
rmdir: /sw: Operation not permitted


root />$ mkdir a
root />$ rmdir a
root />$ rmdir sw
<b>rmdir: sw: Operation not permitted</b>
root />$ rmdir opt
<b>rmdir: opt: Operation not permitted</b>
root />$ rmdir mnt
<b>rmdir: mnt: Operation not permitted</b>
root />$ rmdir home
<b>rmdir: home: Operation not permitted</b>

What exactly is preventing me from removing these directories even with SIP disabled?

  • Welcome Water - would you review the hold message and help links it contains? I see three distinct questions - the why is probably off topic for here, but let’s ask you to edit this down to one question and we can see if it’s on topic for this site. – bmike Jun 18 at 23:55
  • I think /sw is mostly associated with Fink, while /opt could be due to using MacPorts, or XQuartz (which, if I'm not mistaken, installs to /opt/X11), or some other Unix software that installs to /opt. I'm not sure about /mnt. – Rinzwind Jun 19 at 9:42
  • Well, I will try to understand the rules (for posting info). But at least I should be able to remove unnecessary directories (which I don't use). However, Apple protects it far too much, even with root privilege, and tuned off rootless mechanism, still I can not remove those files. I purchased my hardware and I am not allowed to manage my files on it... – Water Jun 19 at 14:27
  • 1
    Please keep in mind that questions about why Apple does or doesn't do certain things are off-topic in general. – nohillside Jun 19 at 17:18
  • @Rinzwind yes, you are right, after upgrade to Catalina Beta 2, my X11 crashed. Library not loaded: /opt/X11/*/libAppleWM.7.dylib Referenced from: /Applications/Utilities/XQuartz.app/Contents/MacOS/X11.bin – Water Jun 19 at 21:46
2

Apple documented that the system will be read only publicly during wwdc.

enter image description here

You can read more in the public videos and apple developer / beta / seeding discussion forums and possibly in whatever release notes came with how you obtained your beta build of macOS.

I don’t have a system to test, but use the same ls command as on Mojave and earlier to check flags and you might find these are protected via SIP and you would need to disable SIP to make temporary changes as an admin. I know that was covered in the video, but I don’t recall which precise paths are considered read only.

0

Root level is read-only. You'll notice that you cannot create or move things to / either.

This is hard-wired and cannot be disabled: the System is mounted as a read-only volume, and the writable areas are a separate volume, but they are 'merged' (a bit like Fusion) to appear as one continuous volume.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .