Our application installs by default to the /Applications folder on Mac OS X, but this only works for admin user accounts, on non-admin accounts I am seeing 'Error changing permissions to 040755' is their anyway for the BitRock installer to install to this folder with a non-admin account?

asked 05 Jul '13, 08:46

Ben's gravatar image

accept rate: 0%

You need to raise your file access permissions to administrative level. I don't know of any way to this on a per-component or on a per-folder basis; we're using the <requireinstallationbyrootuser> project property.


answered 05 Jul '13, 09:02

Dirk%20Stegemann's gravatar image

Dirk Stegemann
accept rate: 31%

edited 05 Jul '13, 09:03

You can use a helper variable and define default value for the installation depending on if /Applications is writable on OS X. For example:

<setInstallerVariable> <name>default_installdir</name> <value>${platform_install_prefix}/${product_shortname}-${product_version}</value> </setInstallerVariable> <setInstallerVariable> <name>default_installdir</name> <value>${user_home_directory}/${product_shortname}-${product_version}</value> <ruleList> <platformTest> <type>osx</type> </platformTest> <fileTest> <condition>not_writable</condition> <path>${platform_install_prefix}</path> </fileTest> </ruleList> </setInstallerVariable>

You should add that to <initializationActionList> and <preShowHelpActionList>.

The installdir variable should also use ${default_installdir} as the <default> value:

<directoryParameter> <name>installdir</name> <description>Installer.Parameter.installdir.description</description> <explanation>Installer.Parameter.installdir.explanation</explanation> <value></value> <default>${default_installdir}</default> <allowEmptyValue>0</allowEmptyValue> <cliOptionName>prefix</cliOptionName> <mustBeWritable>1</mustBeWritable> <mustExist>0</mustExist> <width>40</width> </directoryParameter>


answered 05 Jul '13, 10:08

wojciechka's gravatar image

wojciechka ♦♦
accept rate: 26%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 05 Jul '13, 08:46

Seen: 3,519 times

Last updated: 05 Jul '13, 10:08