hansva opened a new issue, #9418:
URL: https://github.com/apache/hop/issues/9418

   ### Apache Hop version?
   
   2.20.0
   
   ### Java version?
   
   21
   
   ### Operating system
   
   Other
   
   ### What happened?
   
   Since 2.20.0, every save of `hop-config.json` leaves the file with mode 
`600` (`rw-------`), owned by the user who saved it. Before that save the file 
can have any permissions, for example `664`.
   
   In a multi-user setup where several OS users share one `config/` folder (for 
example a shared Hop GUI install on Linux), the first user who saves locks 
everyone else out. The other users can no longer read the file, so the GUI 
fails for them. A user who can write to the folder can still replace the file, 
but then they own it and lock out everyone else.
   
   **Cause**
   
   `ConfigFileSerializer.writeAtomically()` writes the new content to a temp 
file and moves it over `hop-config.json`. The temp file is created with 
`Files.createTempFile()`, which on POSIX systems always uses `rw-------` and 
ignores the umask. The move carries those permissions over to `hop-config.json`.
   
   In 2.19 the code wrote a `.new` file with the normal umask permissions, so 
group access survived a save.
   
   
   ### Issue Priority
   
   Priority: 2
   
   ### Issue Component
   
   Component: API


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to