Support Questions

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

Hive CLI login issue


Hi All

I am having a strange issue when I tried to login from "infa" user.

I have no issue with "hive" user.

[infa@bdm ~]$ hive log4j:WARN No such property [maxFileSize] in org.apache.log4j.DailyRollingFileAppender. Logging initialized using configuration in file:/etc/hive/ Exception in thread "main" java.lang.RuntimeException: java.lang.RuntimeException: Permission denied at org.apache.hadoop.hive.ql.session.SessionState.start( at at org.apache.hadoop.hive.cli.CliDriver.main( at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke( at sun.reflect.DelegatingMethodAccessorImpl.invoke( at java.lang.reflect.Method.invoke( at at org.apache.hadoop.util.RunJar.main( Caused by: java.lang.RuntimeException: Permission denied at org.apache.hadoop.hive.ql.session.SessionState.start( ... 8 more Caused by: Permission denied at Method) at at org.apache.hadoop.hive.common.FileUtils.createTempFile( at org.apache.hadoop.hive.ql.session.SessionState.createTempFile( at org.apache.hadoop.hive.ql.session.SessionState.start( ... 8 more

I have checked the HDFS directories in Hive under /tmp for write access to infa user for below folders and it has the write access.

drwxrwxrwx - infa hdfs 0 2018-09-27 10:33 /tmp/hive

drwxrwxrwx - hive hdfs 0 2018-09-25 15:01 /tmp/hive1

drwxr-xr-x - hdfs hdfs 0 2018-09-06 21:21 /tmp/infa

Do i miss something here ?




Expert Contributor

This issue is happening because user infa does not have privilege to create local directory in /tmp/

You can launch hive with custom local directory which might have privileges for infa user.

hive --hiveconf hive.exec.local.scratchdir=<local machine path>


Hi Naresh

the above comment worked fine for the hive logging. But the actual issue is due to permission issue in ./tmp/infa folder.

Once I granted the permissions to this folder the issue got resolved.



Expert Contributor

Glad to hear that the issue is resolved. You can either create local folder & give permissions or Hive will create hive.exec.local.scratchdir & provide permissions as configured in hive.scratch.dir.permission

Provided if the user is having privileges on parent directory.

If my answer helped to resolve the issue, accept the answer. It might help others in the community.