Ernillew / wl500g

Automatically exported from code.google.com/p/wl500g
0 stars 0 forks source link

NFS4 mount fails with access denied by server error #212

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. add nfs export string in web interface or manually to /etc/exports (and run 
exportfs -r), e.g. "/home/dmig/Media 192.168.1.0/24(rw,async)"

2. make sure, that share is accessible:
$ showmount -e 192.168.1.1
Export list for 192.168.1.1:
/home/dmig/Media 192.168.1.0/24

3. try to mount: 
sudo mount -vvv -t nfs4 192.168.1.1:/home/dmig/Media /media/Router -o 
proto=udp,soft,noatime
mount: fstab path: "/etc/fstab"
mount: mtab path:  "/etc/mtab"
mount: lock path:  "/etc/mtab~"
mount: temp path:  "/etc/mtab.tmp"
mount: UID:        0
mount: eUID:       0
mount: spec:  "192.168.1.1:/home/dmig/Media"
mount: node:  "/media/Router"
mount: types: "nfs4"
mount: opts:  "proto=udp,soft,noatime"
mount: external mount: argv[0] = "/sbin/mount.nfs4"
mount: external mount: argv[1] = "192.168.1.1:/home/dmig/Media"
mount: external mount: argv[2] = "/media/Router"
mount: external mount: argv[3] = "-v"
mount: external mount: argv[4] = "-o"
mount: external mount: argv[5] = "rw,noatime,proto=udp,soft"
mount.nfs4: timeout set for Sat Mar 26 00:43:27 2011
mount.nfs4: trying text-based options 
'proto=udp,soft,addr=192.168.1.1,clientaddr=192.168.1.93'
mount.nfs4: mount(2): Permission denied
mount.nfs4: access denied by server while mounting 192.168.1.1:/home/dmig/Media

What is the expected output? What do you see instead?
NFS share just mounted to specified point, as it worked with NFS3

What version of the product are you using?
WL500gP v1, 1.9.2.7-rtn-r2845

Please provide any additional information below.
Can't tell if this behavior is a bug, but nfsd doesn't emit any messages to 
router log. This IS a bug.

Original issue reported on code.google.com by dmitriy.geels on 25 Mar 2011 at 9:45

GoogleCodeExporter commented 9 years ago
NFS4 is very old in 2.6.22 kernel, so bug seems to be in kernel code. So, 
probably backports from upstream required. Unfortunately, we haven't time for 
this task right now.

Simple workaround - use NFSv3.

Original comment by lly.dev on 26 Mar 2011 at 6:36

GoogleCodeExporter commented 9 years ago
How do I use nfs3? Start nfs daemon manually, specifying protocol version to 
use?

Forgot to mention: sudo mount -t nfs finishes with same error.

Original comment by dmitriy.geels on 26 Mar 2011 at 7:24

GoogleCodeExporter commented 9 years ago
"-o vers=3" works for me (OpenSUSE 11.3 host)

Original comment by lly.dev on 26 Mar 2011 at 8:38

GoogleCodeExporter commented 9 years ago
"vers=3" helped, thanks!

At least, workaround found.

Original comment by dmitriy.geels on 26 Mar 2011 at 8:42

GoogleCodeExporter commented 9 years ago
Whoops - same issue here, though "-o vers=3" didn't help me:

sudo showmount -e 192.168.1.1
Export list for 192.168.1.1:
/tmp/mnt/disca_1 192.168.1.0/24

sudo mount -vvv -t nfs 192.168.1.1:/tmp/mnt/disca_1 Music -o vers=3
mount: fstab path: "/etc/fstab"
mount: mtab path:  "/etc/mtab"
mount: lock path:  "/etc/mtab~"
mount: temp path:  "/etc/mtab.tmp"
mount: UID:        0
mount: eUID:       0
mount: spec:  "192.168.1.1:/tmp/mnt/disca_1"
mount: node:  "Music"
mount: types: "nfs"
mount: opts:  "vers=3"
mount: external mount: argv[0] = "/sbin/mount.nfs"
mount: external mount: argv[1] = "192.168.1.1:/tmp/mnt/disca_1"
mount: external mount: argv[2] = "Music"
mount: external mount: argv[3] = "-v"
mount: external mount: argv[4] = "-o"
mount: external mount: argv[5] = "rw,vers=3"
mount.nfs: timeout set for Thu Mar 31 11:20:51 2011
mount.nfs: trying text-based options 'vers=3,addr=192.168.1.1'
mount.nfs: prog 100003, trying vers=3, prot=6
mount.nfs: trying 192.168.1.1 prog 100003 vers 3 prot TCP port 2049
mount.nfs: prog 100005, trying vers=3, prot=17
mount.nfs: trying 192.168.1.1 prog 100005 vers 3 prot UDP port 1010
mount.nfs: mount(2): Permission denied
mount.nfs: access denied by server while mounting 192.168.1.1:/tmp/mnt/disca_1

I'm running 1.9.2.7-rtn-r2775 on WL-500gP V2 box.  By the way, I'm most 
impressed and grateful for the work on this firmware.  My partner and I live 
off-grid and depend on a 3G connection for our internet, and this firmware has 
made our lives easier !

Original comment by odona...@gmail.com on 31 Mar 2011 at 9:28

GoogleCodeExporter commented 9 years ago
First of all, some filesystems, like ntfs, was unexportable until r3252.

Mandatory "-o vers=3" solved in r3278 by disabling NFSv4 at all, until we done 
appropriate backports from upstream.

Original comment by lly.dev on 10 Sep 2011 at 12:38