Starting with the path, recursively set ownership of files and subdirectories.
    :param path: Root path
    :param uid: User ID
    :param gid: Group ID
    :return: None

def set_path_ownership(path, uid, gid):
    """
    Starting with the path, recursively set ownership of files and subdirectories.
    :param path: Root path
    :param uid: User ID
    :param gid: Group ID
    :return: None
    """
    os.chown(path, uid, gid)
    for root, dirs, files in os.walk(path):
        for d in dirs:
            if not(os.path.islink(os.path.join(root, d))):
                os.chown(os.path.join(root, d), uid, gid)
        for f in files:
            if not(os.path.islink(os.path.join(root, f))):
                os.chown(os.path.join(root, f), uid, gid)