Permission denied at hdfs

前端 未结 6 924
眼角桃花
眼角桃花 2020-11-27 12:48

I am new to hadoop distributed file system, I have done complete installation of hadoop single node on my machine.but after that when i am going to upload data to hdfs it gi

6条回答
  •  粉色の甜心
    2020-11-27 13:11

    You are experiencing two separate problems here:


    hduser@ubuntu:/usr/local/hadoop$ hadoop fs -put /usr/local/input-data/ /input put: /usr/local/input-data (Permission denied)
    

    Here, the user hduser does not have access to the local directory /usr/local/input-data. That is, your local permissions are too restrictive. You should change it.


    hduser@ubuntu:/usr/local/hadoop$ sudo bin/hadoop fs -put /usr/local/input-data/ /inwe put: org.apache.hadoop.security.AccessControlException: Permission denied: user=root, access=WRITE, inode="":hduser:supergroup:rwxr-xr-x
    

    Here, the user root (since you are using sudo) does not have access to the HDFS directory /input. As you can see: hduser:supergroup:rwxr-xr-x says only hduser has write access. Hadoop doesn't really respect root as a special user.


    To fix this, I suggest you change the permissions on the local data:

    sudo chmod -R og+rx /usr/local/input-data/
    

    Then, try the put command again as hduser.

提交回复
热议问题