Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
How to set linux permissions to installed files with QMake
Here is a guide to set permissions for installed files on linux.
I've looked at these references:
But couldn't find any mention of setting permissions.
According to this post: http://www.qtcentre.org/threads/13687-How-to-set-permission-of-installed-files-via-qmake there is a QMake variable called QMAKE_INSTALL_FILE but this is not documented in the variables reference link above.
Thus I modified my .pro file to the following:
target.path = /opt/my_app_dir
INSTALLS += target
QMAKE_INSTALL_FILE = install -m 6755 -p -o root -g root QMAKE_INSTALL_PROGRAM = install -m 6755 -p -o root -g root
Where /opt/my_app_dir is the directory in which I wanted to install my file.
I got the "install" options from http://linux.about.com/library/cmd/blcmdl1_install.htm
AcerExtensa last edited by
How about to post this like article in wiki? :)
Great suggestion, I've just created one now: http://qt-project.org/wiki/How_to_set_installed_file_permissions_for_Linux
The wiki page has been moved by another user. The new link is: http://qt-project.org/wiki/Set-Installed-File-Permissions-for-Linux