Create a Hadoop cluster when creating and using the hadoop user, Hadoop is also installed in the hadoop user directory.
When the switch to Linux users root access HDFS, permission errors will be reported.
HDFS own groups and users are synchronized Linux systems, the default group and supergroup hadoop user group in Linux default no supergroup.
Create a supergroup group, and add users hadoop
groupadd supergroup
usermod -a -G supergroup hadoop
According to need to add users, add root user here
usermod -a -G supergroup root
Now root access HDFS, you can create folders, etc.
hadoop fs -mkdir /root
hadoop fs -fs /
Reference:
will increase superuser HDFS normal user group and their application scenario supergroup