title: Permission denied error while creating database through java in hive
body: <p>I have tried to create database in hive using java.</p>
  
  <p>But I got this error while running the code:</p>
  
  <blockquote>
    <p>Exception in thread "main" java.sql.SQLException: Error while
    processing statement: FAILED: Execution Error, return code 1 from
    org.apache.hadoop.hive.ql.exec.DDLTask. MetaException(message:Got
    exception: org.apache.hadoop.security.AccessControlException
    Permission denied: user=hive, access=WRITE,
    inode="/user/hive/warehouse/sampledb.db":root:supergroup:drwxr-xr-x</p>
  </blockquote>
  
  <p>I have given read an write privileges to the folder <code>/user/hive/warehouse/</code>. Still I am getting this error. Any remedies???</p>