Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Permission Denied for user=hive on LOAD DATA INPATH

Solved Go to solution
Highlighted

Permission Denied for user=hive on LOAD DATA INPATH

New Contributor

When trying to go through the tutorials on http://hortonworks.com/hadoop-tutorial/hello-world... I get a permission denied error when trying to LOAD DATA INPATH '/tmp/admin/data/trucks.csv' OVERWRITE INTO TABLE trucks_stage;

This is using a brand new sandbox 2.3.2 instance in Azure. I did give the trucks.csv file WRITE permission for all 3. I am logged into Ambari as "admin". It appears the operation is running as "hive", which makes sense since that shows as the service account.

LOG SNIPPET:

INFO : Loading data to table default.trucks_stage from hdfs://sandbox.hortonworks.com:8020/tmp/admin/data/trucks.csv ERROR : Failed with exception Unable to move source hdfs://sandbox.hortonworks.com:8020/tmp/admin/data/trucks.csv to destination hdfs://sandbox.hortonworks.com:8020/apps/hive/warehouse/trucks_stage/trucks.csv org.apache.hadoop.hive.ql.metadata.HiveException: Unable to move source hdfs://sandbox.hortonworks.com:8020/tmp/admin/data/trucks.csv to destination hdfs://sandbox.hortonworks.com:8020/apps/hive/warehouse/trucks_stage/trucks.csv

...

Caused by: org.apache.hadoop.security.AccessControlException: Permission denied: user=hive, access=WRITE, inode="/tmp/admin/data/trucks.csv":admin:hdfs:drwxr-xr-x

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: Permission Denied for user=hive on LOAD DATA INPATH

@Peter Lasne

Please, give write access to everyone to folder /tmp/admin/data also, not only file /tmp/admin/data/trucks.csv

View solution in original post

6 REPLIES 6
Highlighted

Re: Permission Denied for user=hive on LOAD DATA INPATH

@Peter Lasne As you see, only admin user has write access which is resulting into this issue. Please give write access to Hive user here and that should fix issue. Usually I would recommend having rwxrwxrwx on /tmp.

/tmp/admin/data/trucks.csv":admin:hdfs:drwxr-xr-x

Highlighted

Re: Permission Denied for user=hive on LOAD DATA INPATH

@Peter Lasne

Please, give write access to everyone to folder /tmp/admin/data also, not only file /tmp/admin/data/trucks.csv

View solution in original post

Highlighted

Re: Permission Denied for user=hive on LOAD DATA INPATH

New Contributor

Thanks, granting permission for all users from /tmp up through /data worked fine. I am confused why the tutorial from http://hortonworks.com/hadoop-tutorial/hello-world... specifies only changing the permissions on the file if more than that is required.

Highlighted

Re: Permission Denied for user=hive on LOAD DATA INPATH

@Peter Lasne

Tutorial will be fixed ASAP.

@zblanco

Highlighted

Re: Permission Denied for user=hive on LOAD DATA INPATH

Rising Star

The part of the tutorial in question has been updated.

Highlighted

Re: Permission Denied for user=hive on LOAD DATA INPATH

Explorer

How to give write access to the file or folder

Don't have an account?
Coming from Hortonworks? Activate your account here