HDFS客户端的权限错误:Permission denied | IT人生录
- -搭建了一个Hadoop的环境,Hadoop集群环境部署在几个Linux服务器上,现在想使用windows上的Java客户端来操作集群中的HDFS文件,但是在客户端运行时出现了如下的认证错误,被折磨了几天,问题终得以解决. (如果想看最终解决问题的方法拉到最后,如果想看我的问题解决思路请从上向下看).
In Linux, the system prompts "passwd:Permission denied" when changing the root password.
Alibaba Cloud reminds you that:
- Before you perform operations that may cause risks, such as modifying instance configurations or data, we recommend that you check the disaster recovery and fault tolerance capabilities of the instances to ensure data security.
- You can modify the configurations and data of instances including but not limited to Elastic Compute Service (ECS) and Relational Database Service (RDS) instances. Before the modification, we recommend that you create snapshots or enable RDS log backup.
- If you have authorized or submitted sensitive information such as the logon account and password in the Alibaba Cloud Management Console, we recommend that you modify such information in a timely manner.
Follow these steps to troubleshoot the problem.
/etc/passwd
, /etc/shadow
, and /etc/pam.d
files have the required permissions./var/log/secure
log, you can see the prompt "several files do not exist, Module error" in the secure log.strace -o /tmp/changepasswd passwd root
/etc/pam.d/system-auth-ac
. If the file format is DOS, run the following command to adjust the format: dos2unix system-auth-ac