Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Accessing NFS gateway files and folders as superuser

avatar
Contributor

Hi,

 

I have a host running a NFS gateway mounted on the same machine under /mnt/hdfs.

Permissions seems to work fine for all the regular users, my only issue is the hdfs user. When I access a file using the native hdfs client the hdfs user is considered "the root user" and can perform any operation, is this true even for the file and folders exported via the NFS gateway?

 

In my installation it doesn't work:

 

[hdfs@hostname:/mnt/hdfs/app]$ ls -l
total 3
drwxr-x---. 5 userA nobody 160 19 giu 13:02 appA
drwxr-x---. 5 userB nobody 160 19 giu 13:02 appB
drwxr-x---. 5 userC nobody 160 19 giu 13:02 appC
[hdfs@hostname:/mnt/hdfs/app]$ cd appA
bash: cd: appA: Permission denied

If I try to read from the folder /mnt/hdfs/app/appA as userA it works just fine.

 

Is this the expected or I have misconfigured something?

1 ACCEPTED SOLUTION

avatar
Contributor

Apparently this is the expeced behaviour.

 

This JIRA https://issues.apache.org/jira/browse/HDFS-6488 added support for the superuser (backported in CDH 5.8.x) but it is still disabled by default.

 

To set a superuser I've added a safety-valve with the following:

 

<property>
  <name>nfs.superuser</name>
  <value>the_name_of_hdfs_superuser</value>
</property>

View solution in original post

1 REPLY 1

avatar
Contributor

Apparently this is the expeced behaviour.

 

This JIRA https://issues.apache.org/jira/browse/HDFS-6488 added support for the superuser (backported in CDH 5.8.x) but it is still disabled by default.

 

To set a superuser I've added a safety-valve with the following:

 

<property>
  <name>nfs.superuser</name>
  <value>the_name_of_hdfs_superuser</value>
</property>