lp1860187 Global Read Access on Properties user/khuckins/lp1860187-global-read-on-properties
authorKyle Huckins <khuckins@catalyte.io>
Tue, 21 Jan 2020 20:36:14 +0000 (20:36 +0000)
committerKyle Huckins <khuckins@catalyte.io>
Thu, 23 Jan 2020 23:07:47 +0000 (23:07 +0000)
- Provide Generic Read Access to all Users for the Hatch.properties
and logging.properties files located in Program Files on Windows
Install.

Signed-off-by: Kyle Huckins <khuckins@catalyte.io>
 Changes to be committed:
modified:   installer/windows/hatch.nsi

installer/windows/hatch.nsi

index 08ef332..993b8e5 100644 (file)
@@ -123,6 +123,10 @@ section "install"
     !insertmacro _ReplaceInFile  "$INSTDIR\hatch.properties" "#data.directory=/tmp/foo" "data.directory=C://ProgramData//${APPNAME}"
     !insertmacro _ReplaceInFile  "$INSTDIR\logging.properties" "%h/.evergreen/hatch.log" "C://ProgramData//${APPNAME}//hatch.log"
 
+    ; Ensure our properties files are readable and writable
+    AccessControl::GrantOnFile "$INSTDIR\hatch.properties" "(BU)" "GenericRead+ReadData+ReadEA+ReadAttributes+ReadControl+GenericExecute+Execute"
+    AccessControl::GrantOnFile "$INSTDIR\logging.properties" "(BU)" "GenericRead+ReadData+ReadEA+ReadAttributes+ReadControl+GenericExecute+Execute"
+
     ; Registry info for Add/Remove Programs
     WriteRegStr HKLM "SOFTWARE\${COMPANYNAME}\${APPNAME}" "Logging Path" $APPDATA
     SetShellVarContext current