获取localhost:mkdir:无法创建目录'// logs':权限被拒绝

时间:2018-04-19 11:48:15

标签: ubuntu hadoop hadoop2

我安装了全新的hadoop 2.9设置,一切似乎都没问题。但是,只有一个错误,我无法通过。当我执行命令

start-dfs.sh

我得到以下错误:

localhost: mkdir: cannot create directory ‘//logs’: Permission denied
localhost: chown: cannot access '//logs': No such file or directory
localhost: starting namenode, logging to //logs/hadoop-amitesh-namenode-amitesh-VirtualBox.out
localhost: /usr/local/hadoop/hadoop-2.9.0/sbin/hadoop-daemon.sh: line 159: //logs/hadoop-amitesh-namenode-amitesh-VirtualBox.out: No such file or directory
localhost: head: cannot open '//logs/hadoop-amitesh-namenode-amitesh-VirtualBox.out' for reading: No such file or directory
localhost: /usr/local/hadoop/hadoop-2.9.0/sbin/hadoop-daemon.sh: line 177: //logs/hadoop-amitesh-namenode-amitesh-VirtualBox.out: No such file or directory
localhost: /usr/local/hadoop/hadoop-2.9.0/sbin/hadoop-daemon.sh: line 178: //logs/hadoop-amitesh-namenode-amitesh-VirtualBox.out: No such file or directory

有2个观察结果:

1)The error says //logs. However, ideally the path should had been /usr/local/hadoop/hadoop-2.9.0. Not sure about it

2) By being sudo, I gave chown -R amitesh:amitesh hadoop.
  However, the top 2 directories "usr" and "local" still has root ownership:group.

有什么建议吗?我确实在stackoverflow上看到了一些其他文章,但它们对我的情况没有帮助。

0 个答案:

没有答案