Permission denied on MAC OS when running an application during installation?

Answered

Comments

2 comments

  • Avatar
    Dirk Stegemann

    You'll want to elevate your installer program's file access permissions. The easiest way to to this is to add the <requireInstallationByRootUser>1</requireInstallationByRootUser> property to your project.

    Then, upon launch of your installation program, the user is asked to enter their administrative credentials, and your installer program can perform administrative tasks (such as running scripts with administrative permissions).

  • Avatar
    juanjo

    It is also possible that you are trying to directly execute an application bundle directly (the black boxes do not let me see the extension :)). In that case, you will either have to call its CFBundleExecutable (defined under application.app/Contents/Info.plist) as:

    <runProgram>
           <program>/Applications/application.app/Contents/MacOS/binaryName</program>
           <!-- Uncomment the below if you need to call it in backcground -->
           <!-- <programArguments>&amp;</programArguments>-->
    </runProgram>
    

    Or use the open program:

    <runProgram>
           <program>open</program>
           <programArguments>/Applications/application.app</programArguments>
    </runProgram>
    

    The above will call it in the background. If you need to do it in the foreground, you will need the -W argument:

    <runProgram>
           <program>open</program>
           <programArguments>-W /Applications/application.app</programArguments>
    </runProgram>
    

Please sign in to leave a comment.