def chmod(patch, path, mode):
    """Change the mode of path to the numeric mode."""
    ap = os.path.abspath(os.path.join(CWD, path))
    manager = get_manager()
    fsi, relpath, readonly = manager.get_fsi(ap)
    if fsi is None:
        return _org_chmod(relpath, mode)
    elif readonly:
        raise IOError("[Errno 1] Operation not permitted: '{p}'".format(p=ap))
    else:
        # we cant do this
        pass
Change the mode of path to the numeric mode.
lib/mlpatches/mount_base.py