Difference between revisions of "Set Installed File Permissions for Linux"
From Qt Wiki
AutoSpider (talk | contribs) (Add "cleanup" tag) |
|||
Line 1: | Line 1: | ||
+ | {{Cleanup | reason=Auto-imported from ExpressionEngine.}} | ||
+ | |||
[[Category:HowTo]] | [[Category:HowTo]] | ||
Revision as of 16:58, 3 March 2015
Here is a guide to set permissions for installed files on linux.
In your .pro file, change QMAKE_INSTALL_FILE and QMAKE_INSTALL_PROGRAM to the following:
QMAKE_INSTALL_FILE = install -m <permission octals> -p -o <user> -g <group>
QMAKE_INSTALL_PROGRAM = install -m <permission octals> -p -o <user> -g <group>
where:
- <permissions octals> is the standard linux permissions octals (ex: 755).
- <owner> is the owner of the file. This parameter can be ommited.
- <group> is the group owner of the file. This parameter can also be ommited.
unix {
target.path = /opt/myApp
INSTALLS += target
QMAKE_INSTALL_FILE = install -m 6755 -p -o root -g root
QMAKE_INSTALL_PROGRAM = install -m 6755 -p -o root -g root
}