In addition to previous asked question
I am trying to format namenode in hdfs but says: permission denied
for which I had not any responses but again I am posting what I have done to remove permissions to get job done:
I have tried command: Both below commands are from thread: Permission denied at hdfs
sudo -u hduser bash
edits hdfs-site.xml
using as:hduser@Ubuntu:/usr/hadoop/hadoop-2.7.1/etc/hadoop$ sudo gedit hdfs-site.xml
In this I have added permission as false:
<property>
<name>dfs.permissions</name>
<value>false</value>
</property>
and running the command again :
hduser@Ubuntu:/usr/hadoop/hadoop-2.7.1$ bin/hdfs namenode -format bin/hdfs: line 304: /root/software/jdk1.8.0_45/bin/java: Permission denied bin/hdfs: line 304: exec: /root/software/jdk1.8.0_45/bin/java: cannot execute: Permission denied
and when I use it with sudo
It gives :
hduser@Ubuntu:/usr/hadoop/hadoop-2.7.1$ sudo bin/hdfs namenode -format bin/hdfs: line 304: /root/software/jdk1.8.0_45/bin/java: No such file or directory
What could be the solution.