Tuesday, May 22, 2018

Permission denied Issue in HDFS of Hadoop

Symptom:

   When you try to create a new directory in HDFS via
hadoop fs -mkdir  /user/test
Error is:
mkdir: Permission denied: user=oracle, access=WRITE, inode="/user":hdfs:supergroup:drwxr-xr-x

Solutions:

  It's due to the /user belongs  hdfs user and with permission 755. It does not allow other users to create directories on it

 Use sudo to do it:
sudo -u hdfs  hadoop fs -mkdir  /user/test

Or su - hdfs to do it

No comments:

Post a Comment