All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benny Halevy <bhalevy@panasas.com>
To: "J. Bruce Fields" <bfields@fieldses.org>,
	Steve Dickson <steved@redhat.com>
Cc: howard chen <howachen@gmail.com>, linux-nfs@vger.kernel.org
Subject: Re: Permission denied when mounting NFS (was okay before)
Date: Tue, 03 Mar 2009 12:04:17 +0200	[thread overview]
Message-ID: <49AD00A1.3050606@panasas.com> (raw)
In-Reply-To: <20080929172630.GB23212@fieldses.org>

On Sep. 29, 2008, 20:26 +0300, "J. Bruce Fields" <bfields@fieldses.org> wrote:
> On Mon, Sep 29, 2008 at 12:53:16PM +0800, howard chen wrote:
>> Hello all,
>>
>> On Mon, Sep 29, 2008 at 12:21 PM, howard chen <howachen@gmail.com> wrote:
>>> Yes, tested, and same error... Also tried "no_root_squash"...
>>>
>>> Really have no idea what is going on...
>>>
>> Problem solved by adding the following line in fstab, according to
>> this site: http://www.linuxforums.org/forum/linux-networking/44779-nfs-permission-denied-error.html
> 
> Huh.  Surely mountd or knfsd could have given a more helpful error
> message, at least....

I agree.
I've just hit this problem again today (running Fedora 9).
(and I think http://bugzilla.redhat.com/show_bug.cgi?id=218994 might
be the same thing BTW)

rpc.mountd just prints
authenticated mount request from 192.168.0.140:669 for /usr0/export
even when invoked with --debug all.

However it denies access.  Here's tshark -V output:

Remote Procedure Call, Type:Call XID:0xee9360da
    Fragment header: Last fragment, 124 bytes
        1... .... .... .... .... .... .... .... = Last Fragment: Yes
        .000 0000 0000 0000 0000 0000 0111 1100 = Fragment Length: 124
    XID: 0xee9360da (4002635994)
    Message Type: Call (0)
    RPC Version: 2
    Program: MOUNT (100005)
    Program Version: 3
    Procedure: MNT (1)
    Credentials
        Flavor: AUTH_UNIX (1)
        Length: 68
        Stamp: 0x004235f6
        Machine Name: pangw.bhalevy.com
            length: 17
            contents: pangw.bhalevy.com
            fill bytes: opaque data
        UID: 0
        GID: 0
        Auxiliary GIDs
            GID: 0
            GID: 1
            GID: 2
            GID: 3
            GID: 4
            GID: 6
            GID: 10
    Verifier
        Flavor: AUTH_NULL (0)
        Length: 0
Mount Service
    [Program Version: 3]
    [V3 Procedure: MNT (1)]
    Path: /usr0/export
        length: 12
        contents: /usr0/export

...
Remote Procedure Call, Type:Reply XID:0xee9360da
    Fragment header: Last fragment, 28 bytes
        1... .... .... .... .... .... .... .... = Last Fragment: Yes
        .000 0000 0000 0000 0000 0000 0001 1100 = Fragment Length: 28
    XID: 0xee9360da (4002635994)
    Message Type: Reply (1)
    [Program: MOUNT (100005)]
    [Program Version: 3]
    [Procedure: MNT (1)]
    Reply State: accepted (0)
    [This is a reply to a request in frame 3474]
    [Time from request: 0.000868000 seconds]
    Verifier
        Flavor: AUTH_NULL (0)
        Length: 0
    Accept State: RPC executed successfully (0)
Mount Service
    [Program Version: 3]
    [V3 Procedure: MNT (1)]
    Status: ERR_ACCESS (13)

Running strace rpc.mountd -F --debug all shows:
...
open("/proc/fs/nfsd/filehandle", O_RDWR) = -1 ENOENT (No such file or directory)
open("/proc/fs/nfs/filehandle", O_RDWR) = -1 ENOENT (No such file or directory)


> 
>> nfsd /proc/fs/nfsd nfsd auto,defaults 0 0

doping this manually using
mount -t nfsd nfsd /proc/fs/nfsd
does the same trick

>>
>>
>> This is really funny as I never have this option in my other NFS servers....
>>
>> Anyone know the reason? Redhat's bug?
> 
> It looks like nfsd is supposed to be mounted on load of the nfsd module,
> by a line in /etc/modprobe.d/modprobe.conf.

Right.

# grep nfsd /etc/modprobe.d/modprobe.conf.dist
install nfsd /sbin/modprobe --first-time --ignore-install nfsd && { /bin/mount -t nfsd nfsd /proc/fs/nfsd > /dev/null 2>&1 || :; }
remove nfsd { /bin/umount /proc/fs/nfsd > /dev/null 2>&1 || :; } ; /sbin/modprobe -r --first-time --ignore-remove nfsd

> 
> (Maybe you built a new kernel with nfsd built-in instead of built as a
> module?)
> 
> But I thought nfs-utils was supposed to fall back on old behavior when
> the nfsd filesystem wasn't found.

Doesn't seem so.

Steve: any chance this bug is fixed anywhere?

Benny

> 
> --b.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


  parent reply	other threads:[~2009-03-03 10:04 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-26 11:32 Permission denied when mounting NFS (was okay before) howard chen
     [not found] ` <b66ddc900809260432o4ecfab4fk39b0d06002bae57a@mail.gmail.co m>
     [not found]   ` <b66ddc900809260432o4ecfab4fk39b0d06002bae57a-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
     [not found]     ` <b66ddc900809260432o4ecfab4fk39b0d06002bae57a-JsoAwUIsXouhRSP0FMvGiw@public.gmane.org m>
2008-09-26 11:50       ` Talpey, Thomas
     [not found]         ` <RTPCLUEXC2-PRDM3SOl0000001f-rtwIt2gI0FxT+ZUat5FNkAK/GNPrWCqfQQ4Iyu8u01E@public.gmane.org>
2008-09-26 15:05           ` howard chen
     [not found]           ` <b66ddc900809260805g71578cacr73a526e87a77e677-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
     [not found]             ` <b66ddc900809260805g71578cacr73a526e87a77e677-JsoAwUIsXouhRSP0FMvGiw@public.gmane.org m>
2008-09-26 15:25               ` Talpey, Thomas
     [not found]                 ` <RTPCLUEXC2-PRDNXRPm0000003a-rtwIt2gI0FxT+ZUat5FNkAK/GNPrWCqfQQ4Iyu8u01E@public.gmane.org>
2008-09-26 15:57                   ` howard chen
     [not found]                     ` <b66ddc900809260857o39c4ef31h75af8e7eaf9448fc-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-09-26 16:06                       ` Trond Myklebust
2008-09-26 16:13                         ` howard chen
     [not found]                         ` <b66ddc900809260913r6c009658p958d88aa2e1be99e-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
     [not found]                           ` <b66ddc900809260913r6c009658p958d88aa2e1be99e-JsoAwUIsXouhRSP0FMvGiw@public.gmane.org m>
2008-09-26 16:23                             ` Talpey, Thomas
     [not found]                               ` <RTPCLUEXC2-PRDIIZS20000003d-rtwIt2gI0FxT+ZUat5FNkAK/GNPrWCqfQQ4Iyu8u01E@public.gmane.org>
2008-09-29  4:21                                 ` howard chen
     [not found]                                   ` <b66ddc900809282121t6953e068n62870810f1d0874-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-09-29  4:53                                     ` howard chen
     [not found]                                       ` <b66ddc900809282153yb873d8ayf82f2a61eca9cc18-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-09-29 17:26                                         ` J. Bruce Fields
2008-09-30 13:51                                           ` howard chen
     [not found]                                             ` <b66ddc900809300651i11d07caudd32831d6954f02d-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-09-30 18:51                                               ` J. Bruce Fields
2009-03-03 10:04                                           ` Benny Halevy [this message]
2009-03-03 17:30                                             ` J. Bruce Fields

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49AD00A1.3050606@panasas.com \
    --to=bhalevy@panasas.com \
    --cc=bfields@fieldses.org \
    --cc=howachen@gmail.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=steved@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.