HDFS 上的文件权限

File permissions on HDFS

我找到了很多指导用户如何在 HDFS 上 "create users/groups" 的教程。我想知道 "owner" 或 "group" 在 HDFS 的上下文中意味着什么。

此外,当文件在HDFS 上时,谁是文件的所有者或组用户? Some sources say it is hdfs itself, whereas some 说是客户端进程的用户。

我想知道有一个明确的方法来理解和修复 permission denied 错误。

如第一条所述link

A lot of the administrative HDFS commands need to be run as the “hdfs” OS user, which is the default HDFS super user

默认的超级用户通常是 hdfs,但不一定。

... there’s no fixed super user for Hadoop. The system super user for Hadoop is simply the operating system user that starts the NameNode. The HDFS super user doesn’t have to be the root user of the NameNode host

HDFS 中没有真正的"users/groups"。默认情况下,它都是来自本地 OS 用户的字符串。 Which is overridable by any user。没有 Kerberos,Hadoop 绝对没有真正的授权。

如果您启用权限,那么 hdfs dfs -lshdfs dfs -getfacl 会显示文件权限。 hdfs dfs -chownhdfs dfs -chmod 更改它们。

您创建的任何 HDFS 用户帐户至少应作为名称节点上的 OS(或 PAM 或 LDAP)用户存在,以便任何权限成功获得 HDFS 客户端的确认。