'chown(path, user=None, group=None, recursive=False)'

def chown(self, path, user=None, group=None, recursive=False):

    path = Hdfs.normpath(path)
    params = self._getparams()
    params['op'] = 'SETOWNER'
    if (user is not None):
        params['owner'] = user
    if (group is not None):
        params['group'] = group
    if recursive:
        for xpath in self.listdir_recursive(path):
            self._root.put(xpath, params)
    else:
        self._root.put(path, params)
