Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 Oct 2003 13:38:12 -0500
From:      "Charles Howse" <chowse@charter.net>
To:        <freebsd-questions@freebsd.org>
Subject:   RE: Mount_nfs permission denied
Message-ID:  <004601c38d02$2bf7b190$04fea8c0@moe>
In-Reply-To: <44y8vxkwk8.fsf@be-well.ilk.org>

next in thread | previous in thread | raw e-mail | index | archive | help
> > I'm trying to mount_nfs larry:/usr /mnt
> > And I always get permission denied.
> > It also fails on mount_nfs larry:/disk2 /mnt
> > Any idea what I'm doing wrong?
> >=20
> > [root@larry ~]# df -h
> > Filesystem    Size   Used  Avail Capacity  Mounted on
> > /dev/ad0s1a   492M    54M   399M    12%    /
> > /dev/ad2s1f   1.1G    43M   1.0G     4%    /disk2
> > /dev/ad0s1f   492M   4.0K   453M     0%    /tmp
> > /dev/ad0s1g   6.1G   902M   4.7G    16%    /usr
> > /dev/ad2s1e   984M   347M   558M    38%    /usr/obj
> > /dev/ad0s1e   492M   5.2M   448M     1%    /var
> > procfs        4.0K   4.0K     0B   100%    /proc
> >=20
> > [root@larry ~]# cat /etc/exports
> > /disk2  -alldirs        -network 192.168.254.0  -mask 255.255.255.0
> > /usr    -alldirs        -network 192.168.254.0  -mask 255.255.255.0
> >=20
> > [root@larry ~]# showmount -e
> > Exports list on localhost:
> > /usr                               192.168.254.0
> > /disk2                             192.168.254.0
> >=20
> > [root@larry ~]# ls -l / | grep usr
> > lrwxr-xr-x   1 root  wheel       10 Sep  4 02:58 compat ->=20
> usr/compat
> > lrwxrwxrwx   1 root  wheel        9 Sep  4 03:00 home -> /usr/home
> > lrwxr-xr-x   1 root  wheel       11 Sep 27 15:17 sys -> usr/src/sys
> > drwxr-xr-x  19 root  wheel      512 Sep  4 09:25 usr
>=20
> Looks okay to me. =20
> Are you trying to do the mount on the same machine?

I use a KVM, but effectively, I'm sitting at curly's keyboard, trying to
nfs mount shares that reside on larry.

[root@curly ~]# mount_nfs curly:/disk2 /mnt
curly:/disk2: Permission denied
^C
[root@curly ~]#=20

> Do you have portmap, nfsd, and mountd running on "larry"?

Yes...
[root@larry ~]# sockstat -4
USER     COMMAND    PID   FD PROTO  LOCAL ADDRESS         FOREIGN
ADDRESS
charles  sshd      4076    5 tcp4   192.168.254.3:22
192.168.254.4:4127
root     sshd      4074    5 tcp4   192.168.254.3:22
192.168.254.4:4127
root     nmbd       156    6 udp4   *:137                 *:*
root     nmbd       156    7 udp4   *:138                 *:*
root     nmbd       156    8 udp4   192.168.254.3:137     *:*
root     nmbd       156    9 udp4   192.168.254.3:138     *:*
root     smbd       154   12 tcp4   *:445                 *:*
root     smbd       154   13 tcp4   *:139                 *:*
root     sendmail   121    4 tcp4   127.0.0.1:25          *:*
root     sshd       117    4 tcp4   *:22                  *:*
root     inetd      113    4 tcp4   192.168.254.3:110     *:*
root     rpc.stat    99    3 udp4   *:1011                *:*
root     rpc.stat    99    4 tcp4   *:1022                *:*
root     nfsd        93    3 tcp4   *:2049                *:*
root     mountd      91    3 udp4   *:1023                *:*
root     mountd      91    4 tcp4   *:1023                *:*
daemon   portmap     88    3 udp4   *:111                 *:*
daemon   portmap     88    4 tcp4   *:111                 *:*
root     ntpd        86    4 udp4   *:123                 *:*
root     ntpd        86    5 udp4   192.168.254.3:123     *:*
root     ntpd        86    6 udp4   127.0.0.1:123         *:*

> Is "larry" on the same subnet?

Yes, curly is 192.168.254.2/255.255.255.0 and larry is
192.168.254.3/255.255.255.0

[root@curly ~]# ping -c 3 larry
PING larry (192.168.254.3): 56 data bytes
64 bytes from 192.168.254.3: icmp_seq=3D0 ttl=3D64 time=3D0.318 ms
64 bytes from 192.168.254.3: icmp_seq=3D1 ttl=3D64 time=3D0.319 ms
64 bytes from 192.168.254.3: icmp_seq=3D2 ttl=3D64 time=3D0.280 ms

--- larry ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max/stddev =3D 0.280/0.306/0.319/0.018 ms


Might there be some file(s) on larry that restrict non-local logins?
I checked /etc/login.access on larry, and saw that I had:
-:wheel:All EXCEPT LOCAL
I commented that out, saved.
I checked /etc/hosts.allow, made the appropriate edits there,
specifically the portmap section, saved.
I changed /etc/exports, and changed it to:
/disk2 -maproot=3Droot -network=3D192.168.254.0 -mask=3D255.255.255.0
(This was the only way I could do it without getting an error)
Rebooted, tried again, NOW IT WORKS!
Comments?
Thanks for making me think!








Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?004601c38d02$2bf7b190$04fea8c0>