Frage

I have added an action in my install4j installer to change the owner of a certain file to root:admin, using "Set the owner of files and directories". However, when I run the generated installer, the file's owner is not set (it's the same as everything else -- myusername:admin). I have the configuration set to "Elevate to maximum available privileges" and "Ask user whether to retry or quit on failure". But I am not asked for a password to elevate privileges, and I am not asked to retry or fail.

I'm pretty sure the path and such is correct, because I also am using "Set the UNIX access mode of files and directories" on the exact same file (to make it setuid), and that works fine.

Also, the owner change action is listed in the generated build report, and appears correct there.

This is on a Mac. I haven't tried it on other platforms (because I don't need this particular setuid component on any other platforms).

War es hilfreich?

Lösung 2

I had to set "Try to obtain root privileges if admin user" under OSX in the "Request Privileges" action in the startup folder under the installer section.

This is still a genuine bug in install4j (that there's no error message when you don't do this), but at least there's a way to make it work.

Andere Tipps

install4j does not support elevation on Linux/Unix. You have to run the installer as root if you require root permissions. To investigate if an action was successful, look at the .install4j/installation.log file after the installation.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top