Installed file permissions in Windows

I am building a Windows installer package for my application with CPack (Qt Installer Framework backend).

I have a single file that needs to stay world writable in the installed tree, but so far I am failing.

This is the relevant piece of CMakeLists.txt file:

# Config file
install(
    FILES
    "${CMAKE_CURRENT_SOURCE_DIR}/config.txt"
    DESTINATION .
    COMPONENT supportfiles-component
    PERMISSIONS WORLD_READ WORLD_WRITE
)

Any ideas?

The docs state that “Permissions that do not make sense on certain platforms are ignored on those platforms.” Looking at the code, the mode is set up on Windows, but it does go through _wchmod which probably doesn’t translate 100% to what you’re looking for.

I suspect that the install tree (prior to packaging) may be getting the right permissions, but QtIFW doesn’t know that the perms are “important” and translate that into actual action after installation.