Add a Hadoop group
sudo addgroup Hadoop
Add the current user Larry to the Hadoop group
sudo usermod-a-G Hadoop Larry
Add Hadoop Group to Sudoer
sudo gedit etc/sudoers
Hadoop all= (All) after Root all= (all)
Modify the permissions for the Hadoop directory
sudo chown-r larry:hadoop/home/larry/hadoop< owners: Group files >
Modify permissions for HDFs
sudo chmod-r 755/home/larry/hadoop
sudo bin/hadoop dfs-chmod-r 755/
sudo bin/hadoop dfs-ls/
Modify the owner of the HDFs file
sudo bin/hadoop fs-chown-r Larry/
Unlock Hadoop's Safe mode
sudo bin/hadoop dfsadmin-safemode leave
Copy Local files to HDFs
Hadoop fs-copyfromlocal <localsrc> URI
Prints the contents of the file to the stdout
Hadoop fs-cat file:///file3/user/hadoop/file4
Change the group to which the file belongs
Hadoop FS-CHGRP [-R] GROUP URI
Changing user access rights
Hadoop Fs-chmod [-r] 755 URI
Modify the owner of a file
Hadoop Fs-chown [R] [Owner][:[group]] uri [URI]
Copy hdfs file to local
Hadoop fs-copytolocal URI LOCALDST
Copy hdfs file to other directory
Hadoop fs-cp uri [uri ...] <dest>
Displays the size of all files in the directory
Hadoop fs-du uri [uri ...]
Merging files to local directory
Hadoop fs-getmerge <src> <localdst> [ADDNL]