g_file_set_contents does not presearve file permissions, aka PITA