def METHOD_NAME(self, file_path, mode):
    ret_val = False
    os.system("chmod %s \"%s\"" % (mode, file_path))
    try:
        info = "%o" % os.stat(file_path).st_mode
        info = info[-3 :]
        if info == mode:
            ret_val = True
    except:
        pass
    return ret_val