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

I have the same error, I don’t know what is wrong , I 've made a directory successfully and it is found in the datanode but I can’t copy my data to hadoop

C:\hadoop-3.3.0\sbin>hdfs dfs -copyFromLocal <df_reviews> /hadoop-3.3.0/sbin/test
The system cannot find the file specified.

C:\hadoop-3.3.0\sbin>hdfs dfs -copyFromLocal <cleaned/df_reviews> /hadoop-3.3.0/sbin/test
The system cannot find the file specified.

C:\hadoop-3.3.0\sbin>hdfs dfs -copyFromLocal <cleaned/df_reviews> /hadoop-3.3.0/sbin/test
The system cannot find the file specified.

C:\hadoop-3.3.0\sbin>hdfs dfs -copyFromLocal /hadoop-3.3.0/sbin/test
Access is denied.

Please go thru the HDFS chapter to understand the commands: https://cloudxlab.com/assessment/displayslide/131/why-hdfs?playlist_id=24