View previous topic :: View next topic |
Author |
Message |
krisse Guru
Joined: 15 Mar 2005 Posts: 325 Location: Sweden
|
Posted: Mon Apr 04, 2011 12:07 pm Post subject: NFS: no export entry [SOLV... eh, well: WORKING!] |
|
|
Exporting some directories within the local network. Successfully for most entries, but this one is causing me headaches.
/etc/exports:
Code: | [...]
/home/media 192.168.1.100(ro,all_squash,no_subtree_check,insecure)
[...] |
remote machine:
Code: | $ mount_nfs 192.168.1.99:/home/media meru
mount_nfs: can't access /home/media: Permission denied |
/var/log/messages: Code: | rpc.mountd[16485]: refused mount request from 192.168.1.100 for /home/media (/): no export entry |
exporting machine dir permissions:
Code: | drwxr-xr-x 74 krisse krisse 4,0K 4 apr 13.55 krisse
drwxr-xr-x 6 krisse krisse 4,0K 24 jan 20.08 media |
- Clearly there is an export entry.
- All options in exportfs seems alright: if I replace "media" with "krisse" in /etc/exports I can mount it successfully from remote machine.
- Directory permissions seems OK. Again: works with the dir 'krisse' with exact same ownership and permissions.
- Yes, I have export -ra:d and whatnot.
Thoughts and/or suggestions?
Last edited by krisse on Mon Apr 04, 2011 7:38 pm; edited 1 time in total |
|
Back to top |
|
|
boerKrelis Apprentice
Joined: 01 Jul 2003 Posts: 241 Location: The Netherlands
|
Posted: Mon Apr 04, 2011 12:16 pm Post subject: |
|
|
Is /home/media a mountpoint by any chance? |
|
Back to top |
|
|
krisse Guru
Joined: 15 Mar 2005 Posts: 325 Location: Sweden
|
Posted: Mon Apr 04, 2011 12:20 pm Post subject: |
|
|
Hi! Thanks for taking the time to reply.
boerKrelis wrote: | Is /home/media a mountpoint by any chance? |
Nope. Whole /home is on one and the same mountpoint. So no differences between /home/media and /home/krisse in that regard either. |
|
Back to top |
|
|
boerKrelis Apprentice
Joined: 01 Jul 2003 Posts: 241 Location: The Netherlands
|
Posted: Mon Apr 04, 2011 12:34 pm Post subject: |
|
|
Try 'mount -t nfs -o nfsvers=3 192.168.1.99:/home/media meru' .
And 'mount -t nfs -o nfsvers=3 192.168.1.99:/home/krisse meru' should succeed, have you verified that? |
|
Back to top |
|
|
krisse Guru
Joined: 15 Mar 2005 Posts: 325 Location: Sweden
|
Posted: Mon Apr 04, 2011 12:51 pm Post subject: |
|
|
boerKrelis wrote: | Try 'mount -t nfs -o nfsvers=3 192.168.1.99:/home/media meru' .
And 'mount -t nfs -o nfsvers=3 192.168.1.99:/home/krisse meru' should succeed, have you verified that? |
Exactly the same results as reported above:
Code: | @remote: $ mount -t nfs -o nfsvers=3 192.168.1.99:/home/media meru
mount_nfs: can't access /home/media: Permission denied
@remote: ~ $ mount -t nfs -o nfsvers=3 192.168.1.99:/home/krisse meru
@remote: ~ $ [success] |
And in logs at exporting machine:
Code: | Apr 4 14:47:23 meru rpc.mountd[16829]: refused mount request from 192.168.1.100 for /home/media (/): no export entry
Apr 4 14:47:36 meru rpc.mountd[16829]: authenticated mount request from 192.168.1.100:994 for /home/krisse (/home/krisse) |
Hmm, the following in the logs makes me curious.
Successfull mount of krisse: "for /home/krisse (/home/krisse)"
Unsuccessfull mount of media: "for /home/media (/)"
Am I missing something? Trying to stare at /etc/exports (as seen in my original post, above), but not seeing what might be wrong.
Also /home/media is looking correct in /var/lib/nfs/etab:
Code: | /home/krisse 192.168.1.100(rw,sync,wdelay,hide,nocrossmnt,insecure,root_squash,all_squash,no_subtree_check,secure_locks,acl,anonuid=1000,anongid=1000)
/home/media 192.168.1.100(ro,sync,wdelay,hide,nocrossmnt,insecure,root_squash,all_squash,no_subtree_check,secure_locks,acl,anonuid=65534,anongid=65534) |
|
|
Back to top |
|
|
boerKrelis Apprentice
Joined: 01 Jul 2003 Posts: 241 Location: The Netherlands
|
Posted: Mon Apr 04, 2011 1:23 pm Post subject: |
|
|
I wondered about the (/), too.
So with /home/krisse you squash to uid 1000 (krisse, I presume) and for /home/media you squash to 65534 (nobody). (Why squash?)
Does user nobody have rights to /home/media? Eg on server, 'sudo -u nobody ls /home/media' succeeds? |
|
Back to top |
|
|
krisse Guru
Joined: 15 Mar 2005 Posts: 325 Location: Sweden
|
Posted: Mon Apr 04, 2011 7:10 pm Post subject: |
|
|
boerKrelis wrote: | I wondered about the (/), too. |
I think this is the culprit. But I don't get it. Nor do I, therefore, understand what do do about it.
boerKrelis wrote: | So with /home/krisse you squash to uid 1000 (krisse, I presume) and for /home/media you squash to 65534 (nobody). (Why squash?) Does user nobody have rights to /home/media? Eg on server, 'sudo -u nobody ls /home/media' succeeds? |
Good questions. Squashing to 65534 was a leftover from having been trying different configs. Used to be squashing to uid 1000 (correct; krisse). No, 'nobody' hasn't got rights to /home/media. However, changing it to 1000 did not help. Nor did removing squash alltogether.
Tried copying everything the line verbatim from the entry of directory 'krisse' and only replacing 'krisse' with 'media' (dirs have same perms; see above), but that didn't help either.
It has to be the "refused mount request from 192.168.1.100 for /home/media (/): no export entry". As if it's trying to export root. But why?! |
|
Back to top |
|
|
krisse Guru
Joined: 15 Mar 2005 Posts: 325 Location: Sweden
|
Posted: Mon Apr 04, 2011 7:37 pm Post subject: |
|
|
I swear, I do not now what I did, but it worked. Or rather: I know what I did but I can't for the love of running say why it worked.
I'll admit it freely, I got a bit desperate. Commented out every line in /etc/exports in case some other line was interfering. (Had some subdirs for /home/media exported elsewhere, for instance.) In between every line that was commented out, I ran exportfs -ra and restarted the NFS server and tried to mount media remotely. Nothing worked, until...
Finally I had only the only line left in exports: /home/media --- and, lo and behold, suddenly it started working. I didn't make any(!) changes to that line, only commented out all the others.
But that's not the strange part.
I then started adding lines back; ie. 'uncommenting them back'. Again re-exporting and restarting the NFS server and trying to mount media remotely. Until I had every line back and everything was still working. [...] Yes, even the other exports. As far as I can tell, I've tried each and every one by now, and they all work.
I know I should just shut up and be happy, but seriously. Why does it work now!? [...] There. Now I'll go shut up and be happy about it.
Thanks for your time, boerKrelis! If you have any insights, they're still welcome. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|