Permission denied to copy file in hdfs from local

Permission denied while trying to copy file from local to hdfs.

Could you share exactly which command are you giving? This generally happens when you are trying to write a directory in which you done have permissions.

I am trying a copy from local file system directory to hdfs directory, But I am get the error message - Permission denied.

Below is the error message

[alamuruaswini3524@cxln4 ~]$ hadoop fs -put /home/alamuruaswini3524/Answers.csv /data/answers
put: Permission denied: user=alamuruaswini3524, access=WRITE, inode="/data/answers":hdfs:hdfs:drwxr-xr-x
[alamuruaswini3524@cxln4 ~]$ hadoop fs -ls /data
Found 40 items
-rw-r–r-- 3 hdfs hdfs 588889 2019-07-22 17:48 /data/1lac

Not /home, it should be /user.

1 Like

Why not in the home direcotory sandeep. since the path we are following /home/user_name/<hdfs_directory> is the path we follow to create the files. how we know it will be in the /user/ instead …let me know am i missing any basic concept here