Return-Path: X-Original-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3DD8117725 for ; Fri, 20 Mar 2015 18:08:39 +0000 (UTC) Received: (qmail 54392 invoked by uid 500); 20 Mar 2015 18:08:38 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 54321 invoked by uid 500); 20 Mar 2015 18:08:38 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hdfs-issues@hadoop.apache.org Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 54129 invoked by uid 99); 20 Mar 2015 18:08:38 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Mar 2015 18:08:38 +0000 Date: Fri, 20 Mar 2015 18:08:38 +0000 (UTC) From: "Brandon Li (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HDFS-7942) NFS: support regexp grouping in nfs.exports.allowed.hosts MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HDFS-7942?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14371760#comment-14371760 ] Brandon Li commented on HDFS-7942: ---------------------------------- Here is the explanation for wildcard usage in export table.(http://linux.die.net/man/5/exports) {noformat} wildcards +Machine names may contain the wildcard characters * and ?, or may contain character class lists within [square brackets]. This can be used to make the exports file more compact; for instance, *.cs.foo.edu matches all hosts in the domain cs.foo.edu. As these characters also match the dots in a domain name, the given pattern will also match all hosts within any subdomain of cs.foo.edu. {noformat} Since NFS Gateway uses java regular expression, the usage of wildcards is a bit different. For example, {noformat} 1. instead of "*.cs.foo.edu", one should use "\\w*.cs.foo.edu" 2. instead of "206.190.52.[26|23]", one should use "206.190.52.(26|23)" {noformat} I will update the user guide accordingly. > NFS: support regexp grouping in nfs.exports.allowed.hosts > --------------------------------------------------------- > > Key: HDFS-7942 > URL: https://issues.apache.org/jira/browse/HDFS-7942 > Project: Hadoop HDFS > Issue Type: Bug > Components: nfs > Affects Versions: 2.6.0 > Reporter: Brandon Li > Assignee: Brandon Li > Attachments: HDFS-7942.001.patch > > > Thanks, [~yeshavora], for reporting this problem. > Set regex value in nfs.exports.allowed.hosts property. > {noformat} > nfs.exports.allowed.hosts206.190.52.[26|23] rw > {noformat} > With this value, neither 206.190.52.26 nor 206.190.52.23 can mount nfs and act as nfs client. In conclusion, no host can mount nfs with this regex value due to access denied error. > {noformat} > >$ sudo su - -c "mount -o soft,proto=tcp,vers=3,rsize=1048576,wsize=1048576,nolock 206.190.52.23:/ /tmp/tmp_mnt" root > mount.nfs: access denied by server while mounting 206.190.52.23:/ > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)