CTest log permissions/ownership behavior change?

When you run ctest, it Test logs. It moves old test logs before running new test logs.

I have seen a behavior change switching from CMake 3.10.1 and CMake 3.20.5:

The permissions/ownership of copy of the old log changed. I get access errors when running the tests with different users.
Is this known and by design?

I have no detailed logs or reproductions, but I can supply if you are interested.

This probably wasn’t an intentional change, but it’s not surprising. CMake tries to atomically replace files, so it will write to a temporary new file and then rename to the final location. This will inherently change ownership and permissions, but unless you’re root, there’s not much to be done about this.

Cc: @brad.king