云上架构 · 阅读 682
今天在Centos7上运行如下命令
shell 复制代码######添加hdfs用户#####
useradd hdfs
######切换至hdfs用户#####
su - hdfs
报如下错误
javascript 复制代码-bash: /dev/null: Permission denied
-bash: /dev/null: Permission denied
-bash: /dev/null: Permission denied
-bash: /dev/null: Permission denied
-bash: /dev/null: Permission denied
-bash: /dev/null: Permission denied
查看/dev/null的权限如下
csharp 复制代码ll /dev/null
-rwxr-xr-x 1 root root 9 Jul 25 17:07 null
而其他正常的权限如下
csharp 复制代码crw-rw-rw- 1 root wheel 3, 2 Jul 25 14:08 null
解决步骤如下:
bash 复制代码rm -f /dev/null; mknod -m 666 /dev/null c 1 3
说明:重新reboot和recreate一下/dev/null即可。
标签:hdfs,Permission,Linux,dev,denied,null,bash From: https://www.cnblogs.com/clark1990/p/17486081.html