# CTest log permissions/ownership behavior change?

**URL:** https://discourse.cmake.org/t/ctest-log-permissions-ownership-behavior-change/3870
**Category:** Usage
**Created:** [August 3, 2021, 2:23pm UTC](https://discourse.cmake.org/t/ctest-log-permissions-ownership-behavior-change/3870 "2021-08-03T14:23:35Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![KUGA2](https://discourse.cmake.org/user_avatar/discourse.cmake.org/kuga2/32/4968_2.png) [@KUGA2](https://discourse.cmake.org/u/KUGA2)
#### Post date: [August 3, 2021, 2:23pm UTC](https://discourse.cmake.org/t/ctest-log-permissions-ownership-behavior-change/3870/1 "2021-08-03T14:23:35Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [August 4, 2021, 7:22pm UTC](https://discourse.cmake.org/t/ctest-log-permissions-ownership-behavior-change/3870/2 "2021-08-04T19:22:30Z")

</div>

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
