buf function got sudo and preserve owner/group/modtime on the file