Windows Solution to this
Hi,
I had this error too, and in Windows, I found it to be a different issue.
As you are running the setup via the web site (IIS), you are actually in as a guest/general user.
As such, i did a RIGHT-CLICK on the home folder for osTicket (C:\Helpdesk in my case) and added WRITE and MODIFY permissions for the "Users" group.
Then, the web site could happily edit/write to the config file OK.
Bit of a pain, and no obvious error message comments/help, like "Check file/user permissions", but got there in the end.
Hope this helps!