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.

Can't execute query - Permission denied?,Can't execute DDL query

Solved Go to solution
Highlighted

Re: Can't execute query - Permission denied?,Can't execute DDL query

New Contributor

Connect to hdp vm server as root, then switch hdfs user and then check directory ownership & permission.

[root@fqdn]# su hdfs

[hdfs@fqdn]# hdfs dfs -ls /apps

[hdfs@fqdn]# hdfs dfs -ls /apps/hive

[hdfs@fqdn]# hdfs dfs -chmod 755 /apps/hive

[hdfs@fqdn]# hdfs dfs -chmod 777 /apps/hive/warehouse

if the ownership is incorrect, then try it.

[hdfs@fqdn]# hdfs dfs -chown hdfs:hdfs /apps/hive

[hdfs@fqdn]# hdfs dfs -chown hive:hdfs /apps/hive/warehouse

Re: Can't execute query - Permission denied?,Can't execute DDL query

New Contributor

@Aditya Sirna Tried SSH the node, but now when I try
hdfs dfs -chmod 777/apps
it says

Permission denied: user=cloudbreak is not the owner of inode=apps

Re: Can't execute query - Permission denied?,Can't execute DDL query

You have to run it as hdfs user

Run su hdfs and run the chmod command

Thanks,

Aditya

Re: Can't execute query - Permission denied?,Can't execute DDL query

New Contributor

Thank you so much. The query works now.

-----------------------
SSH to your node, run su hdfs, and then run the chmod command, and then execute the query.

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