Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jar file packaged in install4J has restrictive permissions

Tags:

install4j

I'm testing out Install4J 5.1.5 and am running into a little issue. My original jar file I would like to distribute has full permissions-- anyone can open it (with something like 7zip)-- and modify/delete any entries in that jar. However this same jar-- when installed by install4j-- the permissions become essentially read-only. I can't modify/delete anything in the jar after installation-- gives me permissions issue.

The reason why I want to modify/delete is that there are a few properties files in the jar that get defined by the user during installation so I want to modify / delete whats already in there with the user's new files...

The only thing I can think of is that I set the default unix file and directory modes to 777. But this doesn't seem to work. Any ideas?

like image 835
Los Morales Avatar asked Jan 25 '26 21:01

Los Morales


1 Answers

The installer has a helper process that runs with elevated permissions. This helper process is started by the "Request privileges" action that is by default added to the "Startup" node of the installer.

All actions whose "Action elevation type" property is set to "Elevate to maximum available privileges" are executed in the helper process.

If you want to modify the file in your application (i.e. not in the installer), you can use a "Add Windows file rights" action to make the file writable for everybody.

like image 145
Ingo Kegel Avatar answered Jan 29 '26 14:01

Ingo Kegel