# How to check file permissions with CMake?

**URL:** https://discourse.cmake.org/t/how-to-check-file-permissions-with-cmake/7569
**Category:** Usage
**Created:** [March 1, 2023, 12:23am UTC](https://discourse.cmake.org/t/how-to-check-file-permissions-with-cmake/7569 "2023-03-01T00:23:12Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![buildSystemPerson](https://discourse.cmake.org/user_avatar/discourse.cmake.org/buildsystemperson/32/2851_2.png) [@buildSystemPerson](https://discourse.cmake.org/u/buildSystemPerson)
#### Post date: [March 1, 2023, 12:23am UTC](https://discourse.cmake.org/t/how-to-check-file-permissions-with-cmake/7569/1 "2023-03-01T00:23:12Z")

</div>

Is there a way with CMake to check the permissions of a file?

IE: Read/write/execute permissions?

---

<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: [March 1, 2023, 3:39pm UTC](https://discourse.cmake.org/t/how-to-check-file-permissions-with-cmake/7569/2 "2023-03-01T15:39:07Z")

</div>

I don’t think CMake exposes such things itself today.
