Unable to move my files into hdfs


#1

I tried to move my json files into hdfs by using -put command as shown below.
[kkgprest27288@cxln4 training]$ hdfs dfs -put /home/kkgprest27288/training/employee.json /kkfiles
put: Permission denied: user=kkgprest27288, access=WRITE, inode="/kkfiles.COPYING":hdfs:hdfs:drwxr-xr-x

But it says permission denied…


#2

Hi, Raj.
If you are Copying the local file into the directory in HDFS here is the command .

hdfs dfs –copyFromLocal testfile.txt /user/copy_from_local_example

Where
testfile.txt is the file at the Local.
/user/copy_from_local_example --> is the path in the HDFS where you want to copy the file.

All the best!


#3

stayjit,

[kkgprest27288@cxln4 training]$ hdfs dfs -put /home/kkgprest27288/training/employee.json /kkfiles
put: Permission denied: user=kkgprest27288, access=WRITE, inode="/kkfiles. COPYING ":hdfs:hdfs:drwxr-xr-

my question is why it is saying “permission denied”?
I tried to create new directory in hdfs by using following command
hdfs dfs -mkdir /kkfiles
kkfiles diretcory was successfully created. but it was not visible
and then I tried to move the files into kkfiles directory.
it says “permission denied”…
I just want to know what is the reason ?