su - root in post-install

Comments

1 comment

  • Avatar
    juanjo

    It will be tricky to make su - root -c script when installing as a regular user. Would be possible to require root privileges from the very beginning? You can configure the owner of the installed files using:

    <project>
       ...
       <defaultUnixOwner>${system_username}</defaultUnixOwner>
       ...
    </project>
    

    And also change permissions using the <changePermissions>

     <changePermissions>
      <permissions>0755</permissions>
      <files>${installdir}/executables/*</files>
      <ruleList>
        <platformTest>
          <type>unix</type>
        </platformTest>
      </ruleList>
    </changePermissions>
    

    Regarding going back if some validation fails, if you place the checks in the <validationActionList> and throw an error in case they are invalid, the page will be redrawn. You can find more informetion here.

Please sign in to leave a comment.