title: problems running simple map-reduce hadoop examples in cygwin
body: <p>I am just trying to get Hadoop running on my laptop running 64-bit Windows 7 in standalone mode.  I've installed Cygwin 1.7 in the default folder (c:\cygwin).  I have the latest JDK in the folder c:\jdk1.7.0_03, and have set JAVA_HOME environment variable.</p>
  
  <p>when I try to run the following command from a cygwin prompt:</p>
  
  <pre><code>$ bin/hadoop jar hadoop-examples-*.jar grep input output 'dfs[a-z.]+'
  </code></pre>
  
  <p>Here's the error I get:</p>
  
  <pre><code>12/03/17 19:08:43 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
  java.io.IOException: Failed to set permissions of path: \tmp\hadoop-ehtzrhf\mapred\staging\ehtzrhf837602798\.staging to 0700
          at org.apache.hadoop.fs.FileUtil.checkReturnValue(FileUtil.java:682)
          at org.apache.hadoop.fs.FileUtil.setPermission(FileUtil.java:655)
          at org.apache.hadoop.fs.RawLocalFileSystem.setPermission(RawLocalFileSystem.java:484)
          at org.apache.hadoop.fs.RawLocalFileSystem.mkdirs(RawLocalFileSystem.java:319)
          at org.apache.hadoop.fs.FilterFileSystem.mkdirs(FilterFileSystem.java:189)
          at org.apache.hadoop.mapreduce.JobSubmissionFiles.getStagingDir(JobSubmissionFiles.java:116)
          at org.apache.hadoop.mapred.JobClient$2.run(JobClient.java:848)
          at org.apache.hadoop.mapred.JobClient$2.run(JobClient.java:842)
          at java.security.AccessController.doPrivileged(Native Method)
          at javax.security.auth.Subject.doAs(Subject.java:415)
          at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1059)
          at org.apache.hadoop.mapred.JobClient.submitJobInternal(JobClient.java:842)
          at org.apache.hadoop.mapred.JobClient.submitJob(JobClient.java:816)
          at org.apache.hadoop.mapred.JobClient.runJob(JobClient.java:1253)
          at org.apache.hadoop.examples.Grep.run(Grep.java:69)
          at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
          at org.apache.hadoop.examples.Grep.main(Grep.java:93)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:601)
          at org.apache.hadoop.util.ProgramDriver$ProgramDescription.invoke(ProgramDriver.java:68)
          at org.apache.hadoop.util.ProgramDriver.driver(ProgramDriver.java:139)
          at org.apache.hadoop.examples.ExampleDriver.main(ExampleDriver.java:64)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:601)
          at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
  </code></pre>
  
  <p>I've tried with both Hadoop 1.0.1 and also hadoop-0.20.205.0 and get the same issue.  I've updated my .bashrc with</p>
  
  <pre><code>export TMP=/cygdrive/c/temp
  export TEMP=/cygdrive/c/temp
  </code></pre>
  
  <p>I've also added cygwin bin folder to the path:</p>
  
  <pre><code>export PATH=.:/cygdrive/c/cygwin/bin:$HADOOP_INSTALL/bin
  </code></pre>
  
  <p>I also find it very odd it's showing the path as \tmp... instead of /tmp/...</p>
  
  <p>Short of recompiling or running a Linux VM, any ideas?</p>