As jingzhao pointed out in
HDFS-6411, we need to catch the AccessControlException from the HDFS calls, and return NFS3ERR_ACCESS instead of NFS3ERR_IO for it.
Another possible improvement is to have a single class/method for the common exception handling process, instead of repeating the same exception handling process in different NFS methods.
- is related to
HDFS-6411 nfs-hdfs-gateway mount raises I/O error and hangs when a unauthorized user attempts to access it