Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

permission denied while creating table in hive

avatar

I am creating a table through script , my script is placed at /home/yarn and i am executing the script through yarn user, but i am getting permission error :

user= yarn access= write permission denied

1 ACCEPTED SOLUTION

avatar
Master Mentor

@Anurag Mishra

Can you please share the complete error that you are getting? Also little detail about what your script is doing?

It might be the HDFS directory where the user "yarn" is trying to write and does not have write permission. If that is the case then you might want to give write permission to the "yarn" user to that HDFS directory.

# su - hdfs -c "hdfs dfs -chmod 777 /PATH/WHERE/YARN/USER/IS/WRITING
(OR)
# su - hdfs -c "hdfs dfs -chown -R yarn:hadoop  /PATH/WHERE/YARN/USER/IS/WRITING

.

View solution in original post

1 REPLY 1

avatar
Master Mentor

@Anurag Mishra

Can you please share the complete error that you are getting? Also little detail about what your script is doing?

It might be the HDFS directory where the user "yarn" is trying to write and does not have write permission. If that is the case then you might want to give write permission to the "yarn" user to that HDFS directory.

# su - hdfs -c "hdfs dfs -chmod 777 /PATH/WHERE/YARN/USER/IS/WRITING
(OR)
# su - hdfs -c "hdfs dfs -chown -R yarn:hadoop  /PATH/WHERE/YARN/USER/IS/WRITING

.