{"id":760,"date":"2014-09-25T14:37:24","date_gmt":"2014-09-25T14:37:24","guid":{"rendered":"http:\/\/shivdev.com\/blog\/?p=760"},"modified":"2014-09-25T14:37:24","modified_gmt":"2014-09-25T14:37:24","slug":"permission-denied-error-for-logged-in-user-for-apache-pig","status":"publish","type":"post","link":"http:\/\/shivdev.com\/blog\/2014\/09\/25\/permission-denied-error-for-logged-in-user-for-apache-pig\/","title":{"rendered":"Permission denied error for logged in user for Apache Pig"},"content":{"rendered":"<p>When I was starting <strong>pig<\/strong> using <code>pig -x local<\/code>, I was getting the following error.<\/p>\n<blockquote><p>\nException in thread &#8220;main&#8221; java.io.IOException: Permission denied<br \/>\n\tat java.io.UnixFileSystem.createFileExclusively(Native Method)<br \/>\n\tat java.io.File.createNewFile(File.java:1006)<br \/>\n\tat java.io.File.createTempFile(File.java:1989)<br \/>\n\tat org.apache.hadoop.util.RunJar.main(RunJar.java:119)\n<\/p><\/blockquote>\n<p>Luckily after some searching <a href=\"http:\/\/stackoverflow.com\/questions\/12987831\/permission-denied-error-for-logged-in-user-for-apache-pig\">stackoverflow<\/a> had the the solution which was that ${hadoop.tmp.dir} didn&#8217;t have permissions.<\/p>\n<p>I was trying to run pig as a different user, than the hadoop user.<\/p>\n<blockquote><p>\nsudo chown -R <em>user:group<\/em> \/app\/hadoop\/tmp\n<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>When I was starting pig using pig -x local, I was getting the following error. Exception in thread &#8220;main&#8221; java.io.IOException: Permission denied at java.io.UnixFileSystem.createFileExclusively(Native Method) at java.io.File.createNewFile(File.java:1006) at java.io.File.createTempFile(File.java:1989) at org.apache.hadoop.util.RunJar.main(RunJar.java:119) Luckily after some searching stackoverflow had the the solution which was that ${hadoop.tmp.dir} didn&#8217;t have permissions. I was trying to run pig as a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[30,31],"tags":[],"_links":{"self":[{"href":"http:\/\/shivdev.com\/blog\/wp-json\/wp\/v2\/posts\/760"}],"collection":[{"href":"http:\/\/shivdev.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/shivdev.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/shivdev.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/shivdev.com\/blog\/wp-json\/wp\/v2\/comments?post=760"}],"version-history":[{"count":1,"href":"http:\/\/shivdev.com\/blog\/wp-json\/wp\/v2\/posts\/760\/revisions"}],"predecessor-version":[{"id":761,"href":"http:\/\/shivdev.com\/blog\/wp-json\/wp\/v2\/posts\/760\/revisions\/761"}],"wp:attachment":[{"href":"http:\/\/shivdev.com\/blog\/wp-json\/wp\/v2\/media?parent=760"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/shivdev.com\/blog\/wp-json\/wp\/v2\/categories?post=760"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/shivdev.com\/blog\/wp-json\/wp\/v2\/tags?post=760"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}