12

I'm logged in as admin in MacOS Catalina. When I try to add quota file, I get this output:

sudo touch /.quota.ops.user
> touch: /.quota.ops.user: Read-only file system

Than I tried:

mount -uw /

...and got an error:

mount_apfs: volume could not be mounted: Operation not permitted
mount: / failed with 77
4
  • I haven't tested this, but you might be able to get the intended effect under Catalina with touch /System/Volumes/Data/.quota.ops.user -- this should enable quotas on the volume where user data is stored. Oct 23, 2019 at 18:32
  • Thank you, this is also a good approach. The last link in Tetsujin's answer solves the problem.
    – tolga
    Oct 24, 2019 at 9:10
  • Does the .quota.ops.user file even apply to the new APFS filesystem? I thought quotas worked rather differently there than in HFS+.
    – user1686
    Oct 24, 2019 at 10:52
  • Note that mount -uw / works if you first boot into Recovery Mode by holding Command + r while booting, and then run csrutil disable in Utilities -> Terminal. (See stackoverflow.com/a/59395264/2919326 for more info.) Nov 11, 2020 at 22:56

2 Answers 2

12

Copied directly from Apple KB - About the read-only system volume in macOS Catalina*

TL:DR
With macOS Catalina, you can no longer store files or data in the read-only system volume, nor can you write to the "root" directory ( / ) from the command line, such as with Terminal.

macOS Catalina runs in a read-only system volume, separate from other files on your Mac. When you upgrade to Catalina, a second volume is created, and some files may move to a Relocated Items folder.

macOS Catalina runs on a dedicated, read-only system volume called Macintosh HD. This volume is completely separate from all other data to help prevent the accidental overwriting of critical operating system files. Your files and data are stored in another volume named Macintosh HD - Data. In the Finder, both volumes appear as Macintosh HD.

enter image description here

The Disk Utility app in macOS Catalina shows that Macintosh HD is the read-only system volume and Macintosh HD - Data contains the the rest of your files and data.

If you upgrade to macOS Catalina from an earlier version of macOS, the read-only volume is created during the upgrade process. Files or data that you previously stored in the startup volume are now stored in this new volume, and some of these files may appear in a new folder called Relocated Items. You can check this folder for any files that you can’t locate.

With macOS Catalina, you can no longer store files or data in the read-only system volume, nor can you write to the "root" directory ( / ) from the command line, such as with Terminal.

About the Relocated Items folder

While creating the two separate volumes during the upgrade process, files and data that couldn’t be moved to their new location are placed in a Relocated Items folder. The Relocated Items folder is in the Shared folder within the User folder (/Users/Shared/Relocated Items) and available though a shortcut on the Desktop. The Relocated Items folder includes a PDF document with more details about these files.

*Copied from en-gb site, link will redirect your your local language site

See also Ask Different - Where does the upgrade to macOS Catalina move root “/” directory files?

13
  • Thank you. How weird :/
    – tolga
    Oct 23, 2019 at 12:48
  • Not so weird. It's a security feature that only about a 1 in thousands will ever notice. Most people don't even know what the Terminal application is, far less how to use it. Only a brave few ;-) who like to venture deeper into the system will ever notice Oct 23, 2019 at 14:24
  • okay, I have a folder called U under /, which is probably created by some malware, how do I remove it now? Jun 9, 2020 at 19:08
  • same situation @AeroWindwalker for a remote user. first off, i'll have to see if trying to remove via gui works. and either way i'llproably have to clone, wipe, reformat, reinstall, clone. during some apfs fiasco, about 100 random files (mostly applications) got copied to / Sep 3, 2020 at 15:48
  • @AeroWindwalker & neuralstatic - raise this as a separate question, or search existing questions. No-one but the original poster of this answer [me] will ever see this buried down here.
    – Tetsujin
    Sep 3, 2020 at 15:51
4

See complete answer with more info here: https://stackoverflow.com/a/59395264/2919326

The command mount -uw / works if you first boot into Recovery Mode by holding Command + r while booting, and then run csrutil disable in Utilities -> Terminal.

2
  • 4
    FYI: this doesn't work on Big Sur/11.4 😢
    – aqn
    Jul 22, 2021 at 4:03
  • It's "sudo mount -uw /" and only works up to catalina. not in big sur or later.
    – Geobio Boo
    Mar 16 at 22:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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