"Read-only file system" when I try to touch in Mac OS Catalina

1

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

tolga

Posted 2019-10-23T11:24:28.243

Reputation: 113

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. – Gordon Davisson – 2019-10-23T18:32:31.397

Thank you, this is also a good approach. The last link in Tetsujin's answer solves the problem. – tolga – 2019-10-24T09:10:21.973

Does the .quota.ops.user file even apply to the new APFS filesystem? I thought quotas worked rather differently there than in HFS+. – user1686 – 2019-10-24T10:52:31.360

Answers

4

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?

Tetsujin

Posted 2019-10-23T11:24:28.243

Reputation: 22 456

Thank you. How weird :/ – tolga – 2019-10-23T12:48:49.917

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 – Steve Chambers – 2019-10-23T14:24:35.913