file(INSTALL): CMake 3.24+ as root on macOS incorrectly preserves ownership
When running as root, use of copyfile() on macOS copies everything to the destination, including the file owner.
This problem was introduced by commit 975c4465 (2022-06-09).
This causes files to inherit the file owner of the source file, which is not expected when installing software.
The simple fix to restore the previous behavior is to back out the change.
Edited by Brad King