its more complicated when Daily Click Bonus is activated.
when daily click bonus feature is active, the cron job will update the setting file, this may lead a failed update when the given permission is not 777. But in other hand, leave it to 777 is not good practice.
change the permission manually is also a pain.
So any suggestions?
I made fix on my way, I separated the related click bonus settings to other file and merge it when load setting function is loaded.
so its a middle way between security and functionality, although the click bonus setting file permission set to 666 or 777.
I also have tried to save it directly to DB, but seems more complicated code in order to work properly.