# Accessing "install" arguments from cpack External generator

**URL:** https://discourse.cmake.org/t/accessing-install-arguments-from-cpack-external-generator/469
**Category:** Usage
**Created:** [January 9, 2020, 12:17pm UTC](https://discourse.cmake.org/t/accessing-install-arguments-from-cpack-external-generator/469 "2020-01-09T12:17:50Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Sebastian.Setzer](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/s/34f0e0/32.png) [@Sebastian.Setzer](https://discourse.cmake.org/u/Sebastian.Setzer)
#### Post date: [January 9, 2020, 12:17pm UTC](https://discourse.cmake.org/t/accessing-install-arguments-from-cpack-external-generator/469/1 "2020-01-09T12:17:50Z")

</div>

Dear list,

In the CPACK\_EXTERNAL\_PACKAGE\_SCRIPT, how can you query the arguments passed to the “install” command?

For example, for every file in the “staging” directory, how can you query which PERMISSIONS have been passed to the “install” command?

The use-case is that with cross compiling on a Windows host, the permissions are not available in the filesystem in “staging”.

Next question/feature request: There’s no way to set the OWNER and GROUP in the “install” command, in addition to PERMISSIONS.

Doesn’t anyone else need this?

Is this usually solved by some extra configuration, independent from the settings in the “install” command, by custom External cpack scripts?

Or do maintainers of linux distributions want to do that themselves, and that’s why they don’t want upstream authors to do it in cmake build configuration?

Both topics interact… if there would be a way to configure the USER, it would be even more difficult to do that in “staging” (even without cross compiling on Windows), because  
the package build would usually not be run as root, so it wouldn’t be able to set the user in “staging”.

Regards,

Sebastian

---

<div class="post-metadata">

### Author: ![Sebastian.Setzer](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/s/34f0e0/32.png) [@Sebastian.Setzer](https://discourse.cmake.org/u/Sebastian.Setzer)
#### Post date: [January 9, 2020, 12:34pm UTC](https://discourse.cmake.org/t/accessing-install-arguments-from-cpack-external-generator/469/2 "2020-01-09T12:34:00Z")

</div>

Now that I have signed up to discourse instead of just reading the old mailing list, I see that someone else was asking a related question recently…

> [@Set group when installing files](https://discourse.cmake.org/t/set-group-when-installing-files/464):
>
> Is it possible to set the group for an install when using the CMake installation support?
