title: Hdfs file permission
body: <p>I want to change file permission but this error involved.</p>
  
  <p>Hadoop version : 1.0.3</p>
  
  <p>Netbeans IDE 7.4</p>
  
  <p>JDK = 7u45</p>
  
  <p>Java code :</p>
  
  <pre><code>    Configuration conf = new Configuration();
      conf.addResource(new Path("/home/furkanb/hadoop-1.0.3/conf/core-site.xml"));
      conf.addResource(new Path("/home/furkanb/hadoop-1.0.3/conf/hdfs-site.xml"));
      FileSystem fileSystem = FileSystem.get(conf);
  
      ......
  
      fileSystem.setPermission(new Path(file), FsPermission.createImmutable((short) 0777));
  
      fileSystem.close();
  </code></pre>
  
  <p>I meet to Error:</p>
  
  <pre><code>Exception in thread "main" java.io.IOException: Call to /127.0.0.1:9000 failed on local exception: java.io.EOFException
      at org.apache.hadoop.ipc.Client.wrapException(Client.java:1107)
      at org.apache.hadoop.ipc.Client.call(Client.java:1075)
      at org.apache.hadoop.ipc.RPC$Invoker.invoke(RPC.java:225)
      at com.sun.proxy.$Proxy1.setPermission(Unknown Source)
  </code></pre>
  
  <p>How can i fix it?</p>