NFS Server trouble - mount.nfs access denied

I have configured the NFS Server through the Yast2 module on my newly installed openSUSE box. I created a /share mount from my second hard drive which have the folders Musik and Videos. Here is my /etc/exports

hansoffate@reborn:~/Desktop> cat /etc/exports

I also use an Ubuntu system as my HTPC which I’d like to be able to have access to these folders. However, when I try to mount it, I get an access denied error. I made sure my firewall is off (for the time being) and that my ip address is correct.

Any help would be greatly appreciated.

hansoffate@grunt:/share/Videos$ sudo mount /share/Videos/Upstairs_Videos/
mount.nfs: access denied by server while mounting
hansoffate@grunt:/share/Videos$ sudo mount /share/Musik
mount.nfs: access denied by server while mounting

Some basic checks

On the server do “rpcinfo -p localhost” in a terminal. This will give a listing of running RPC programs that has to include mountd, portmapper, nfs, and nlockmgr.

On the client do “rpcinfo -p”, which has to return status, portmapper, and nlockmgr as running.

I suggest trying disabling NFS4 temporarily to test whether it’s the problem.

Edit /etc/sysconfig/nfs -> NFS4_SUPPORT=“yes” -> NFS4_SUPPORT=“no”

Restart the NFS server.

From server:

hansoffate@reborn:~/Desktop> rpcinfo -p localhost

Program 'rpcinfo' is present in package 'glibc', which is installed on your system.

Absolute path to 'rpcinfo' is '/usr/sbin/rpcinfo', so it might be intended to be run only by user with superuser privileges (eg. root).

bash: rpcinfo: command not found
hansoffate@reborn:~/Desktop> sudo rpcinfo -p localhost
root's password:
sudo: rpcinfo: command not found

From client:

hansoffate@grunt:~/Documents/steve/ppdp-fastaget$ rpcinfo -p
   program vers proto   port
    100000    2   tcp    111  portmapper
    100000    2   udp    111  portmapper

I also changed /etc/sysconfig/nfs so that NFS4_SUPPORT=“no”

I wonder why rpcinfo isn’t working on the server, even though it says the package is installed.

Thanks for the help,

On your server, for openSUSE, you actually have to su to root to run rpcinfo.

On your client it looks like nfs-common isn’t installed or is not running.

sudo apt-get install portmap nfs-common

to install the needed apps. Then

sudo /etc/init.d/portmap restart
sudo /etc/init.d/nfs-common restart

if they still don’t show up using rpcinfo.

BTW portmap is now called rpcbind on recent releases.

Thanks for the help msharnden. I was able to get rpcinfo working and it looks like everything is running correctly. Also, when trying the apt-get install line on my client ubuntu system, those packages seem to be installed. Do you think I’m having the nfs issue because I haven’t setup /etc/hosts.allow? I am not using any firewall, so I don’t think this is the issue. Any other ideas what might be causing this issue?


hansoffate@grunt:~/Documents/steve/ppdp-fastaget$ sudo apt-get install portmap nfs-common
[sudo] password for hansoffate: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
portmap is already the newest version.
nfs-common is already the newest version.
The following packages were automatically installed and are no longer required:
  setserial imagemagick
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 136 not upgraded.

reborn:/home/hansoffate/Desktop # rpcinfo -p localhost
   program vers proto   port  service
    100000    4   tcp    111  portmapper
    100000    3   tcp    111  portmapper
    100000    2   tcp    111  portmapper
    100000    4   udp    111  portmapper
    100000    3   udp    111  portmapper
    100000    2   udp    111  portmapper
    100005    1   udp  42649  mountd
    100005    1   tcp  38675  mountd
    100005    2   udp  42649  mountd
    100005    2   tcp  38675  mountd
    100005    3   udp  42649  mountd
    100005    3   tcp  38675  mountd
    100024    1   udp  52939  status
    100024    1   tcp  50173  status
    100003    2   udp   2049  nfs
    100003    3   udp   2049  nfs
    100021    1   udp  55708  nlockmgr
    100021    3   udp  55708  nlockmgr
    100021    4   udp  55708  nlockmgr
    100003    2   tcp   2049  nfs
    100003    3   tcp   2049  nfs
    100021    1   tcp  48640  nlockmgr
    100021    3   tcp  48640  nlockmgr
    100021    4   tcp  48640  nlockmgr

Take a look at your exports file. I believe you want to export to all machines on your network. After changing it, as root, run exportfs -ra to re-export the shares.

I tried changing it to and (ip of the client) and just *. All of them had the same access denied error when typing : sudo mount /share/Videos/Upstairs_Videos/

Could it be a directory permissions/ownership problem? I can’t believe this share is causing such a problem. Every other time I have made my nfs shares with ubuntu, mandrake, or fedora, I never ran into this problem.

Thanks for the help,

What do you see in the log on your server? I did a quick test setup using the defaults that Yast presented and using openSUSE 11.1 as the server and a Ubuntu 8.04 machine as the client.

So my exports file looks like this.

/mnt/music      *(fsid=0,ro,root_squash,sync,no_subtree_check)

I see in /var/log/messages

authenticated mount request from for /mnt/music (/mnt/music)

when I connect.

As a side note, I turned off NFS4 on the server and wasn’t able to connect.

I have had nfs4 turned off. I just tried turning it on , but I still have the same issue. When I get home tonight, I am going to reload the openSUSE box and setup the NFS share first thing to see if it will work.


I just did a fresh install of openSUSE. I installed the YAST2 NFS server, turned off the firewall, then launched the configuration gui, and set up my shares. I tried connecting with my ubuntu box, and I still have the error, mount.nfs: access denied. I don’t understand what can be causing this problem because it was working with my ubuntu installation 4 days ago.


What does the system logs say on the server? Is it rejecting the connection?

When you restart the services on the Ubuntu machine

sudo /etc/init.d/portmap restart
sudo /etc/init.d/nfs-common restart

both restart cleanly?

How about the logs on the Ubuntu machine?


After waiting a few days, reinstalling opensuse another time, and going over my logs on both my client and server, I have finally got it working. The thing is, I have changed nothing in my setup procedure. I think the client was the one to blame for the error though.

Thanks for all the help.