def chmod(hdfs_path, mode, user=None):
host, port, path_ = path.split(hdfs_path, user)<EOL>fs = hdfs(host, port, user)<EOL>retval = fs.chmod(path_, mode)<EOL>fs.close()<EOL>return retval<EOL>
Change file mode bits.

:type path: string
:param path: the path to the file or directory
:type mode: int
:param mode: the bitmask to set it to (e.g., 0777)