hadoop java.io.IOException: while running namenode -format
try with sudo (I realize you changed permissions) but I would still try sudo and check if that resolves the problem.
Following steps resolved my problem -
1- sudo su
Enter your password.
2-/usr/local/hadoop/bin/hdfs namenode -format.
This has been done for hadoop2.5 in which "hadoop namenode -format" has beendeprecated hence using "hdfs namenode -format"
Check hdfs-site.xml configuration, it may has a wrong path for propertiesdfs.namenode.name.dir and dfs.datanode.data.dirIn my case it was the cause of the problem (directory was situated in other then current user's home folder).