func changeFileOwner()

in pkg/userutils/userutil_linux.go [107:121]


func changeFileOwner(uid int, gid int) {
	if err := chownRecursive(uid, gid, filepath.Join(getInstallPath(), "logs")); err != nil {
		log.Printf("E! Change ownership of %slogs: %v", getInstallPath(), err)
	}

	if err := chownRecursive(uid, gid, filepath.Join(getInstallPath(), "etc")); err != nil {
		log.Printf("E! Change ownership of %setc: %v", getInstallPath(), err)
	}

	if err := chownRecursive(uid, gid, filepath.Join(getInstallPath(), "var")); err != nil {
		log.Printf("E! Change ownership of %svar: %v", getInstallPath(), err)
	}

	log.Printf("I! Change ownership to %v:%v", uid, gid)
}