Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Support Questions

Find answers, ask questions, and share your expertise
Announcements
Share your experience with Cloudera on G2 and get a $25 Amazon Gift card.
Hi, I'm CLEO! Something exciting is coming to the Community. Stay Tuned!

Fix HiveAccessControlException Permission Denied During Beeline INSERT OVERWRITE DIRECTORY

avatar
Super Collaborator

INSERT OVERWRITE DIRECTORY '/tmp' ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t' STORED AS TEXTFILE SELECT visit_id, ivm from abcd.xyz WHERE feed_date BETWEEN '2006-04-01' and '2006-05-01' AND ivm IS NOT NULL limit 10;

Error: Error while compiling statement: FAILED: HiveAccessControlException Permission denied: user [rvchinta] does not have [WRITE] privilege on [/tmp] (state=42000,code=40000) 0: jdbc:hive2://hostname.abc.com:8443>

ranger policy /tmp has 777 to public

HDP version 2.6.1

1 ACCEPTED SOLUTION

avatar
New Member

I can confirm that I had the same problem on HDP 2.6.3. Like suggested, using the fully qualified path (hdfs://<cluster>/path) makes it work.

View solution in original post

5 REPLIES 5

avatar
Super Collaborator

I do not see this permission denied in ranger audit as well.

avatar

INSERT OVERWRITE DIRECTORY "hdfs://sandbox-hdp.hortonworks.com/tmp/hey2" SELECT * FROM mytable;


(i.e. you need to specify full name of cluster) works fine when you have correct configuration in Ranger, but INSERT OVERWRITE DIRECTORY "/tmp/hey2" SELECT * FROM mytable; will fail. At least this is true for HDP 2.6.3

avatar
Explorer

Hi,

Is there a workaround solution for the above or is it a behaviour of 2.6.3 and above?

avatar
Super Collaborator

i updated directory path to hdfs:CLUSTERNAMEHA/tmp and it worked.

avatar
New Member

I can confirm that I had the same problem on HDP 2.6.3. Like suggested, using the fully qualified path (hdfs://<cluster>/path) makes it work.