Solved NFS server denies access

  • Thread starter Thread starter Deleted member 9563
  • Start date Start date
D

Deleted member 9563

Guest
The server is on FreeBSD 11-RELEASE, and I'm trying to connect from a Devuan 1.0 system. Hopefully that setup is not too different from BSD and using Linux won't put people off here. :)

Server setup:
/etc/rc.conf
Code:
rpcbind_enable="YES"                                
nfs_server_enable="YES"                                              
nfs_server_flags="-u -t -n 4"                                        
mountd_enable="YES"                                                  
mountd_flags="-r"                                                    
rpc_lockd_enable="YES"                                               
rpc_statd_enable="YES"
/etc/exports
Code:
/home/stage 192.168.1.105
I then issue the following two commands as root:
service nfsd start
service mountd reload

I will leave out the Devuan config for now. Here is the command I issue there:
mount -t nfs 192.168.1.101:/home/stage /home/stage
and that consistently results in this response. Even with changes in configuration.
Code:
mount.nfs: access denied by server while mounting 192.168.1.101:/home/stage

I have used IP numbers instead of machine names (which are in DNS) just to make sure. And I have temporarily given the /home/stage directories 777 permissions.

What should I look at next?
 
And I have temporarily given the /home/stage directories 777 permissions.
This is never a solution. Besides that, permissions only come into play after the filesystem has been mounted. Permissions have nothing to do with the access denied messages of NFS.

Check if your exports are good: showmount -e 192.168.1.101 Do this on the server itself and from the client.
 
On both server and client the response is the same:
Code:
Export list for 192.168.1.101:

nothing :(
(edit to add that the lan is fine and I can ping each machine from the other.)
 
Ok, if you get nothing there's probably something wrong with the exports file or you restarted nfsd(8)/mountd(8) in the wrong order. Check /var/log/messages, if the exports is wrong you should see an error message there.
 
Ok, if you get nothing there's probably something wrong with the exports file or you restarted nfsd(8)/mountd(8) in the wrong order. Check /var/log/messages, if the exports is wrong you should see an error message there.

I restarted in the order you have there. /var/log/messages says:
Code:
Apr 28 02:28:41 SCO mountd[14322]: bad exports list line /home/stage
Apr 28 02:29:12 SCO mountd[14322]: mount request denied from 192.168.1.105 for /usr/home/stage

Uh oh. Where does that /usr come from?
 
This is a bit of a revelation to me. (blush) I thought the /usr/home was deprecated and always use /home. A directory listing shows them to be the same. That's a bit of a nuisance and I have no idea what caused that or how to fix it.
 
No, /usr/home is certainly not deprecated. What is important though is that /home is a symlink to /usr/home and you can't export symlinks (hence the 'bad exports' message). So set the export to /usr/home/stage.
 
Back
Top