Cloudera: Permission Denied error on hadoop dfs -put



0
[cloudera@localhost temp]$ su cloudera
Password:
[cloudera@localhost temp]$ ls
first.csv
[cloudera@localhost temp]$ hadoop dfs -put first.csv /
DEPRECATED: Use of this script to execute hdfs command is deprecated.
Instead use the hdfs command for it.

put: Permission denied: user=cloudera, access=WRITE, inode="/":hdfs:supergroup:drwxr-xr-x

1 Answer(s)


0

Hi Mehjabeen
This is a permission issue. Let me explain.
The /user/ directory is owned by "hdfs" - hdfs is a superuser

You are logging in as user cloudera - so you will have permissions only to create or write files in the folder /user/cloudera

So a simple fix to your problem would be to copy the files into the /user/cloudera folder as shown below

hadoop dfs -put first.csv /user/cloudera

You can then do an ls to see if the file is copied

hadoop dfs -ls /user/cloudera

Let me know if this works
Thanks
Omair

Your Answer

Click on this code-snippet-icon icon to add code snippet.

Upload Files (Maximum image file size - 1.5 MB, other file size - 10 MB, total size - not more than 50 MB)

Email
Password