title: Permission Denied: Verifying Hadoop dfs
body: <p>Even though this question is going to be an exact replica of another, I am still willing to ask it - since none of the other similar questions (and answers) on StackOverflow and AskUbuntu have helped me out. I am a total newbie, and trying to learn Hive from a TutorialsPoint tutorial.</p>
  
  <p>I've followed the installation guide of JDK 1.7 and Hadoop given in this link: <a href="http://www.tutorialspoint.com/hive/hive_installation.htm" rel="nofollow noreferrer">Hive - Installation</a> to its helm, and got stuck at the Step II: Verifying Hadoop dfs.</p>
  
  <p>On running <code>start-dfs.sh</code> after formatting namenode at home directory, I'm getting the following output:</p>
  
  <pre><code>neil@neil-VirtualBox:~$ start-dfs.sh
  15/08/04 19:42:01 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
  Starting namenodes on [localhost]
  neil@localhost's password: 
  localhost: mkdir: cannot create directory `/usr/local/hadoop/logs': Permission denied
  localhost: chown: cannot access `/usr/local/hadoop/logs': No such file or directory
  localhost: starting namenode, logging to /usr/local/hadoop/logs/hadoop-neil-namenode-neil-VirtualBox.out
  localhost: /usr/local/hadoop/sbin/hadoop-daemon.sh: line 159: /usr/local/hadoop/logs/hadoop-neil-namenode-neil-VirtualBox.out: No such file or directory
  localhost: head: cannot open `/usr/local/hadoop/logs/hadoop-neil-namenode-neil-VirtualBox.out' for reading: No such file or directory
  localhost: /usr/local/hadoop/sbin/hadoop-daemon.sh: line 177: /usr/local/hadoop/logs/hadoop-neil-namenode-neil-VirtualBox.out: No such file or directory
  localhost: /usr/local/hadoop/sbin/hadoop-daemon.sh: line 178: /usr/local/hadoop/logs/hadoop-neil-namenode-neil-VirtualBox.out: No such file or directory
  </code></pre>
  
  <p>I've tried each and every solution posted <a href="https://stackoverflow.com/questions/15211848/hadoop-start-dfs-sh-permission-denied">here</a> and <a href="https://stackoverflow.com/questions/28255344/permission-denied-while-executing-start-dfs-sh-in-ubuntu?rq=1">here</a> without progressing any further.</p>
  
  <p>Also, when I run the 'hadoop version' command, it gives the following output:</p>
  
  <pre><code>Hadoop 2.7.0
  Subversion https://git-wip-us.apache.org/repos/asf/hadoop.git -r d4c8d4d4d203c934e8074b31289a28724c0842cf
  Compiled by jenkins on 2015-04-10T18:40Z
  Compiled with protoc 2.5.0
  From source with checksum a9e90912c37a35c3195d23951fd18f
  This command was run using /usr/local/hadoop/share/hadoop/common/hadoop-common-2.7.0.jar
  </code></pre>
  
  <p>which is bizarre, as I had uninstalled Hadoop 2.7.0 completely before installing Hadoop 2.4.0 as given in the tutorial link. I'm also running Java 1.7.0_79.</p>
  
  <p>I've been stuck on this for 2 days now, and have been crawling the internet since then. Please give me a solution, or links which I can use to understand my way out. Since I'm a complete newbie to installing Hadoop, any form of help is much appreciated. I will also update the questions according to your feedback.</p>
  
  <p>Thanks,</p>
  
  <p>Souradeep</p>