You are saying because you selected to use glib's use_atomic_file_saving you can't fix the permissions (non-atomically) after glib has done the magic? Then you could ditch glib and write to temporary file by yourself and call fsync+close and fix file modes and ACL's etc before renaming over the original file.