Hatch: Installer does not grant proper file permissions

Bug #1741309 reported by Sam Link on 2018-01-04
This bug affects 3 people
Affects Status Importance Assigned to Milestone

Bug Description

Hatch v.0.1.3

When Hatch is installed in Windows, the permissions granted to the file found by default at:

c:\Program Files (x86)\Hatch\extension\host\org.evergreen_ils.hatch.json

are overly restrictive - read access is not granted to non-administrative users. This prevents the Hatch Native Messenger extension from working correctly with Chrome.

The attached image demonstrates what happens when a non-administrative user attempts to read or access the above file.

Sam Link (slink-g) wrote :
Chris Sharp (chrissharp123) wrote :

I can confirm this behavior. In Windows, I installed Hatch as an Administrator, then created a non-administrative user, opened Chrome, activated Hatch and the background page of the Hatch extension showed "Hatch disconnected: Specified native messaging host not found." After changing permissions on c:\Program Files (x86)\Hatch\extension\host\org.evergreen_ils.hatch.json, I was able to connect to Hatch as expected.

Changed in evergreen:
status: New → Confirmed
Ben Dudley (pcdudley) wrote :

I can confirm this problem as well. It happens on PCs in Windows Domain environments as well as non-domain environments with non-administrator users.

Correcting the permissions on the org.evergreen_ils.hatch.json file allows Hatch to work properly.

Jason Boyer (jboyer) wrote :

This was hard to track down but it comes down to the way the _ReplaceInFile macro works. This can be fixed by adding the AccessControl NSIS plugin and using it to add back inherited file permissions so it can be read by all local users. The AccessControl license allows for this without any special notification or advertisement.

And here it is: http://git.evergreen-ils.org/?p=working/Hatch.git;a=shortlog;h=refs/heads/user/jboyer/lp1741309-hatch-file-perms

Jason Boyer (jboyer) wrote :

Attached is a Hatch installer built from this branch so it's easier to test.

Sam Link (slink-g) wrote :

I just tested the new installer - worked perfectly on the first installation, even installing over 0.1.3.

Chris Sharp (chrissharp123) wrote :
tags: added: pullrequest signedoff
Changed in evergreen:
milestone: none → 3.0.3
Bill Erickson (berick) wrote :

Will merge shortly and update the Chrome store version to match. Jason, any particular reason for the build number jump from 0.1.3 to 0.1.5?

Jason Boyer (jboyer) wrote :

No reason, just losing track when I was fighting with Firefox. It can go back to 0.1.4.

Bill Erickson (berick) wrote :

Thanks. No worries, I'm going to stamp the extension as well. I'll sync them up.

Changed in evergreen:
assignee: nobody → Bill Erickson (berick)
Bill Erickson (berick) wrote :

Code merged. Versions bumped to 0.1.4.

Windows installer posted to:



Chrome app updated as well to keep versions in sync.

Changed in evergreen:
assignee: Bill Erickson (berick) → nobody
status: Confirmed → Fix Committed
Terran McCanna (tmccanna) wrote :

Thanks everyone!

Changed in evergreen:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers