You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: configfile_unix.go
    path of file: ./repos/rclone/fs/config/configfile
    
    the code of the file until where you have to start completion: // Read, write and edit the config file
// Unix specific functions.

//go:build darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
// +build darwin dragonfly freebsd linux netbsd openb
    
func attemptCopyGroup(fromPath, toPath string) {
	info, err := os.Stat(fromPath)
	if err != nil || info.Sys() == nil {
		return
	}
	if stat, ok := info.Sys().(*syscall.Stat_t); ok {
		uid := int(stat.Uid)
		// prefer self over previous owner of file, because it has a higher chance
		// of success
		if user, err := user.Current(); err == nil {
			if tmpUID, err := strconv.Atoi(user.Uid); err == nil {
				uid = tmpUID
			}
		}
		if err = os.Chown(toPath, uid, int(stat.Gid)); err != nil {
			fs.Debugf(nil, "Failed to keep previous owner of config file: %v", err)
		}
	}
}