Ive never used kies but i assume its like odin. Does your phone go into download mode? If yes then put it in download mode and see if kies will flash again
But to directly answer you, there is a "fix permissions" option in twrp but if you cant get into recovery then thats not the answer to your problem