Two days ago I updated my main development Mac from Ventura to Sonoma. Besides the bugs already mentioned yesterday, I've found another new bug. This bug did not exist in Ventura and earlier. You can reproduce the bug via the GUI or Terminal.
On Sonoma, I get "Operation failed with status 1: Operation not permitted", but it succeeds on Ventura and earlier.
And reproducing with Terminal:
% cd /Users/Shared
% mkdir test
% touch test/test
% chflags uchg test/test
% hdiutil create -format UDZO -srcfolder test -verbose test.dmg
This also fails on Sonoma but not on Ventura and earlier. (I used /User/Shared instead of, say, ~/Desktop to avoid any issues with TCC permissions.)
copying /Users/Shared/test to /Volumes/test
About to copy "/Users/Shared/test".
copy error (canceling): /Volumes/test/test: Operation not permitted
Copy finished with error 1 (Operation not permitted).
But creating the disk image succeeds on Sonoma if the uchg (user immutable) flag is removed. (See man chflags for details.)
% chflags nouchg test/test
% hdiutil create -format UDZO -srcfolder test -verbose test.dmg
Unfortunately, sudo hdiutil has the same problem with locked files and doesn't work either. Also ineffective are the -anyowners and -skipunreadable options. This is a really bad bug! I'm not aware of any workaround, other than unlocking the locked files.
I encountered this Sonoma bug while trying to make an encrypted backup of my home directory, which I do every day. It wasn't an issue on Ventura, but it's an issue now that I've updated to Sonoma. I'm terrified that this bug is also going to break my full disk backup method, which I've described before. That would cause a lot of problems for me, and I may come to rue the day that I installed Sonoma.
By the way, I've discovered a reference to the bug from back in December in the Apple Discussion Forums.
It's very frustrating that Apple keeps breaking things that used to work. This reminds me of the macOS Ventura 13.3.1 bug where hdiutil chpass silently failed with encrypted sparse bundles. That bug also caused me problems, and it wasn't ever fixed in Ventura, though it's now fixed in Sonoma. It doesn't help when a macOS update fixes one bug only to introduce another bug.